wayland: Do not reset clipboard data offer on keyboard leave (#16126)
Closes #14415 (also removed an unused serial while I was at it) Release Notes: - Linux: Fixed cross-window copy/paste not working in some Wayland configurations.
This commit is contained in:
parent
abc712014a
commit
7523a7a437
2 changed files with 1 additions and 7 deletions
|
@ -1110,10 +1110,7 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
|
||||||
state.keymap_state = Some(xkb::State::new(&keymap));
|
state.keymap_state = Some(xkb::State::new(&keymap));
|
||||||
state.compose_state = get_xkb_compose_state(&xkb_context);
|
state.compose_state = get_xkb_compose_state(&xkb_context);
|
||||||
}
|
}
|
||||||
wl_keyboard::Event::Enter {
|
wl_keyboard::Event::Enter { surface, .. } => {
|
||||||
serial, surface, ..
|
|
||||||
} => {
|
|
||||||
state.serial_tracker.update(SerialKind::KeyEnter, serial);
|
|
||||||
state.keyboard_focused_window = get_window(&mut state, &surface.id());
|
state.keyboard_focused_window = get_window(&mut state, &surface.id());
|
||||||
state.enter_token = Some(());
|
state.enter_token = Some(());
|
||||||
|
|
||||||
|
@ -1128,8 +1125,6 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientStatePtr {
|
||||||
state.enter_token.take();
|
state.enter_token.take();
|
||||||
// Prevent keyboard events from repeating after opening e.g. a file chooser and closing it quickly
|
// Prevent keyboard events from repeating after opening e.g. a file chooser and closing it quickly
|
||||||
state.repeat.current_id += 1;
|
state.repeat.current_id += 1;
|
||||||
state.clipboard.set_offer(None);
|
|
||||||
state.clipboard.set_primary_offer(None);
|
|
||||||
|
|
||||||
if let Some(window) = keyboard_focused_window {
|
if let Some(window) = keyboard_focused_window {
|
||||||
if let Some(ref mut compose) = state.compose_state {
|
if let Some(ref mut compose) = state.compose_state {
|
||||||
|
|
|
@ -6,7 +6,6 @@ pub(crate) enum SerialKind {
|
||||||
InputMethod,
|
InputMethod,
|
||||||
MouseEnter,
|
MouseEnter,
|
||||||
MousePress,
|
MousePress,
|
||||||
KeyEnter,
|
|
||||||
KeyPress,
|
KeyPress,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue