baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.79k stars 414 forks source link

Keys not received by the parent window when mouse is on the child window #1347

Open QiangF opened 2 years ago

QiangF commented 2 years ago

EAF is a popular emacs package that uses X reparenting, so the child window is managed by Emacs. It donw't work well in tiling window manager like bspwm and i3wm, because the keys are sent to the child window bypassing the parent Emacs window. https://github.com/emacs-eaf/emacs-application-framework/issues/237

It seems to be the window manager's fault to not send the keyboard input to the parent window, when the mouse focus is in a child window that is re-parented.

Is it possible to fix the issue without affecting other use cases? Thank you!

ortango commented 2 years ago

out of curiosity: why is this the window manager's fault? EAF seems to have issues with a few wms.

bspwm uses a simple xcb_set_input_focus() to set focus (i think bspwm actually takes the WM_TAKE_FOCUS path to focus with EAF, since it sets input hint = false.), which makes me wonder if EAF would work correctly without a window manager at all... there is even an xpra user in that bug report who also has the issue, maybe confirming that is the case.

in the absence of a window manager shouldn't the application handle it's own focus correctly?