xwayland: Handle _NET_ACTIVE_WINDOW client messages

Allow X11 clients to activate a window.

This shares the logic with xdg-activation. It might make sense to handle
the urgent hint on an X11 Window natively, but for now this just marks a
workspace as urgent on activation in the same way xdg-activation does.
This commit is contained in:
Ian Douglas Scott 2025-11-25 14:37:48 -08:00 committed by Victoria Brekenfeld
parent 8fc7f0809f
commit cf55b6c899
2 changed files with 139 additions and 114 deletions

View file

@ -1110,6 +1110,18 @@ impl XwmHandler for State {
}
}
fn active_window_request(
&mut self,
_xwm: XwmId,
window: X11Surface,
_timestamp: u32,
_currently_active_window: Option<X11Surface>,
) {
if let Some(surface) = window.wl_surface() {
self.activate_surface(&surface, None);
}
}
fn send_selection(
&mut self,
_xwm: XwmId,