dreamcat4 / skippy-xd

A full-screen Exposé-style standalone task switcher for X11.
GNU General Public License v2.0
100 stars 12 forks source link

When no window is focused, skippy gives bad user experience #106

Closed felixfung closed 1 year ago

felixfung commented 1 year ago

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

felixfung commented 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 :(

felixfung commented 1 year ago

@dreamcat4 you might have some idea how to deal with xlib?

dreamcat4 commented 1 year ago

sadly no idea i'm afraid ...but it's a really good question!! :+1:

felixfung commented 1 year ago

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...