Date: Sun, 22 Mar 2020 04:04:12 +0000 From: bugzilla-noreply@freebsd.org To: xfce@FreeBSD.org Subject: [Bug 244290] x11-wm/xfce4 does not see up arrow after reinstall Message-ID: <bug-244290-28711-bNxymcvRzI@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-244290-28711@https.bugs.freebsd.org/bugzilla/> References: <bug-244290-28711@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244290 --- Comment #18 from Jethro Nederhof <jethro@jethron.id.au> --- OK so I've dug into this a bit further and I think there is a relevant bug = in XFCE. For port x11/libxfce4menu, in libxfce4kbd-private/xfce-shortcuts-grabber.c = and the xfce_shortcuts_grabber_keys_changed function. This function is called whenever the X11 keymap is updated, it 'ungrabs' all the current shortcut k= eys, then loops through again and 'grabs' them again. Grabs are implemented agai= nst the keycode value provided by the keymap, but the problem is the removal ungrabs with the current updated value from the keymap (keys[i].keycode), rather than the old one. So the problem manifests as: XFCE loads with a keymap XFCE registers shortcuts that use keys in that keymap The keymap updates The changes in the keymap update involve keys used in shortcuts XFCE ungrabs the shortcuts using the 'new' keymap codes The 'old' keymap codes never get ungrabbed, but the new keycodes are grabbed So for me when XFCE starts, gdk_keymap_get_entires_for_keyval() tells XFCE = that "keycode 111 (Up) maps to keyval 65377 (Print)" (for whatever reason), XFCE maps the shortcut to it, then shortly after the keymap updates and says that "actually keycode 107 (Print) maps to keyval 65377 (Print)" and XFCE then ungrabs keycode 107, then grabs it again, and the grab against 111 just sta= ys there forever without being cleaned up.=20 I don't know much about X programming, but guess 'up' itself fails since ev= en when it matches the grab, the keyval doesn't match keyval 65377 (Print) so = it never tries to launch the associated shortcut in xfce_shortcuts_grabber_event_filter(), then the 'flash' is the keypress eve= nt getting sent to the root_window and unfocusing/refocusing the child window which never receives the event due to XGrabKey's owner_events being false. The setxkbmap workaround works by racing XFCE and updating the keymap so it= 's correct the first time and nothing needs to be cleaned up, but the problem would arise again if the keymap got updated mid-session (though why this happens every session for me I haven't discovered). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244290-28711-bNxymcvRzI>