mirror of
https://github.com/wez/wezterm.git
synced 2024-09-20 03:09:06 +03:00
Revert "wayland: implement focus_change callback"
This reverts commit bfa8d0c207
,
which proved not to be needed because it was already covered
by the `KeyboardEvent::Enter` and `KeyboardEvent::Leave` handling.
This commit is contained in:
parent
f0e94084d1
commit
a396a64550
@ -109,7 +109,6 @@ struct PendingEvent {
|
||||
refresh_decorations: bool,
|
||||
configure: Option<(u32, u32)>,
|
||||
dpi: Option<i32>,
|
||||
focus: Option<bool>,
|
||||
}
|
||||
|
||||
impl PendingEvent {
|
||||
@ -131,13 +130,8 @@ impl PendingEvent {
|
||||
false
|
||||
}
|
||||
}
|
||||
Event::Configure { new_size, states } => {
|
||||
Event::Configure { new_size, .. } => {
|
||||
let changed;
|
||||
self.focus.replace(
|
||||
states
|
||||
.iter()
|
||||
.any(|&s| s == toolkit::window::State::Activated),
|
||||
);
|
||||
if let Some(new_size) = new_size {
|
||||
changed = self.configure.is_none();
|
||||
self.configure.replace(new_size);
|
||||
@ -475,15 +469,9 @@ impl WaylandWindowInner {
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(focus) = pending.focus.take() {
|
||||
self.callbacks.focus_change(focus);
|
||||
}
|
||||
|
||||
self.refresh_frame();
|
||||
self.do_paint().unwrap();
|
||||
}
|
||||
} else if let Some(focus) = pending.focus.take() {
|
||||
self.callbacks.focus_change(focus);
|
||||
}
|
||||
if pending.refresh_decorations && self.window.is_some() {
|
||||
self.refresh_frame();
|
||||
|
Loading…
Reference in New Issue
Block a user