Refine shell status controls and glass rendering; defer cursor redraw safely
This commit is contained in:
1 parent
e85fc1e032
commit
b3fa82b53b
53 files changed
+3329
-259
No files matched your search
@@ -63,6 +63,10 @@ impl CompositorHandler for Ferese {
|
||||
}
|
||||
|
||||
fn destroyed(&mut self, surface: &WlSurface) {
|
||||
// A removed popup changes the backdrop even without a final buffer
|
||||
// commit. Invalidate expanded sampling regions as well as its bounds.
|
||||
self.invalidate_material_scene();
|
||||
crate::backends::direct::render_all(self);
|
||||
if self.idle_inhibitors.remove(surface).is_some() {
|
||||
self.idle_notifier_state
|
||||
.set_is_inhibited(!self.idle_inhibitors.is_empty());
|
||||
|
||||
@@ -59,7 +59,10 @@ impl SeatHandler for Ferese {
|
||||
.or_insert_with(|| crate::cursor::load_named_cursor(&self.cursor_theme, *icon));
|
||||
}
|
||||
self.cursor_status = image;
|
||||
crate::backends::direct::render_all(self);
|
||||
// Pointer focus transitions invoke this with the pointer lock held.
|
||||
// render_all -> cursor_elements -> current_location would try to
|
||||
// acquire that same lock, freezing the entire compositor thread.
|
||||
self.cursor_redraw_pending = true;
|
||||
}
|
||||
|
||||
fn focus_changed(&mut self, seat: &Seat<Self>, focused: Option<&WlSurface>) {
|
||||
|
||||
@@ -272,6 +272,10 @@ impl XdgShellHandler for Ferese {
|
||||
}
|
||||
if let Some(keyboard) = seat.get_keyboard() {
|
||||
keyboard.set_grab(self, PopupKeyboardGrab::new(&popup_grab), serial);
|
||||
// Focus the popup immediately, rather than waiting for its first
|
||||
// key event. Shell clients use focus to initialize popup effects,
|
||||
// and Escape must be delivered to the popup from the outset.
|
||||
keyboard.set_focus(self, popup_grab.current_grab(), serial);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user