Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 clipboard support #5479

Closed
wants to merge 10 commits into from

fixup! Implement X11 clipboard integration (Issue #5376).

  • Loading branch information
aweinstock314 committed Apr 1, 2015
commit 208b61a0640f6a7b9bbdd357feb7d656f09ac5a1
@@ -69,6 +69,9 @@ git = "https://github.com/servo/string-cache"
[dependencies.xlib]
git = "https://github.com/servo/rust-xlib"

[dependencies.clipboard]
git = "https://github.com/aweinstock314/rust-x11-clipboard"

[dependencies]
encoding = "0.2"
url = "0.2.16"

This file was deleted.

@@ -55,6 +55,8 @@ extern crate uuid;
extern crate string_cache;
#[cfg(target_os="linux")]
extern crate xlib;
#[cfg(target_os="linux")]
extern crate clipboard;

pub mod cors;

@@ -67,7 +69,6 @@ pub mod layout_interface;
pub mod page;
pub mod script_task;
mod timers;
pub mod clipboard;
pub mod textinput;
mod devtools;

@@ -31,6 +31,8 @@ struct TextPoint {
index: usize,
}

no_jsmanaged_fields!(ClipboardContext);

/// Encapsulated state for handling keyboard input in a single or multiline text input control.
#[jstraceable]
pub struct TextInput {
@@ -302,7 +304,7 @@ impl TextInput {
KeyReaction::Nothing
},
"v" if is_control_key(event) => {
let contents = self.clipboard_ctx.get_contents();
let contents = self.clipboard_ctx.get_contents().unwrap();
self.insert_string(contents.as_slice());
KeyReaction::DispatchInput
},
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.