srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/protocols.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-02-11 14:00:00 +0200
committersrdusr <[email protected]>2025-02-11 14:00:00 +0200
commitb1d69a552cdcc7370c4befd42ef2111c8b367c46 (patch)
tree777c30cae47ab7f2d417c3132c8273fdf2bee3fc /crates/wayland/src/protocols.rs
parentb1609928eeea54578cd0cd18935110260cb23a11 (diff)
downloadsrdwm-b1d69a552cdcc7370c4befd42ef2111c8b367c46.tar.gz
srdwm-b1d69a552cdcc7370c4befd42ef2111c8b367c46.zip
Add temporary diagnostics for two live-reproduced bugs
1. A popup's xdg_popup.grab (Firefox's own right-click menu, concretely) receiving zero pointer input at all - no hover highlight, no click effect, not even dismiss-on-miss - logs whether grab_popup actually succeeds, since a silent failure there would explain exactly this. 2. srd dispatch activate_workspace returning {"ok":true} without ever changing the current workspace, confirmed via a raw socket request bypassing the CLI entirely. switch_workspace's own logic reads correct; logs its actual inputs/state to find out why the real process disagrees with it. Remove once both are resolved.
Diffstat (limited to 'crates/wayland/src/protocols.rs')
-rw-r--r--crates/wayland/src/protocols.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/crates/wayland/src/protocols.rs b/crates/wayland/src/protocols.rs
index 0b0eea2..391f665 100644
--- a/crates/wayland/src/protocols.rs
+++ b/crates/wayland/src/protocols.rs
@@ -346,9 +346,19 @@ impl XdgShellHandler for CompState {
/// `resize_request` already ignore the same parameter.
fn grab(&mut self, surface: PopupSurface, _seat: wl_seat::WlSeat, serial: Serial) {
let popup = PopupKind::Xdg(surface);
- let Ok(root) = find_popup_root_surface(&popup) else { return };
+ let Ok(root) = find_popup_root_surface(&popup) else {
+ log::warn!("POPUP-GRAB-DIAG find_popup_root_surface failed");
+ return;
+ };
let seat = self.seat.clone();
- let Ok(grab) = self.popups.grab_popup(root, popup, &seat, serial) else { return };
+ let grab = match self.popups.grab_popup(root, popup, &seat, serial) {
+ Ok(g) => g,
+ Err(e) => {
+ log::warn!("POPUP-GRAB-DIAG grab_popup failed: {e:?}");
+ return;
+ }
+ };
+ log::warn!("POPUP-GRAB-DIAG grab established, has_pointer={} has_keyboard={}", seat.get_pointer().is_some(), seat.get_keyboard().is_some());
if let Some(keyboard) = seat.get_keyboard() {
keyboard.set_grab(self, PopupKeyboardGrab::new(&grab), serial);
}