Closed felixfung closed 1 year ago
This bug is still possible when this route is triggered:
https://github.com/dreamcat4/skippy-xd/blob/7e2b0901ad6750ffdf1583d45c03c754efee67e4/src/wm.c#L691
...and I have no idea how to fix it with xlib :(
@dreamcat4 you might have some idea how to deal with xlib?
sadly no idea i'm afraid ...but it's a really good question!! :+1:
Looks like when the mouse is pointing to the very edge of the screen, bad behaviour still manifests. The fix has to be proper selection of virtual desktop...
When no window is focused and skippy-xd is invoked: https://github.com/dreamcat4/skippy-xd/blob/d0da841dbcac46c9a6bc9a766767656630a9365a/src/skippy.c#L706
skippy-xd cannot accept user keyboard input via clientwin_handle(). Hence, user keyboard events trigger weird behaviour and the user gets very bad user experience.
The bug fix would be to introduce a new function wm_find_top_window(), which finds the top-most window in the current virtual desktop. Then call it here, together with wm_activate_window(): https://github.com/dreamcat4/skippy-xd/blob/d0da841dbcac46c9a6bc9a766767656630a9365a/src/wm.c#L679
This also relates to paging, where currently it does not reliably focus on a window. By calling wm_find_top_window() and wm_activate_window() here: https://github.com/dreamcat4/skippy-xd/blob/d0da841dbcac46c9a6bc9a766767656630a9365a/src/skippy.c#L856