morgant / mlvwm

Macintosh-like Virtual Window Manager (official repo)
http://www2u.biglobe.ne.jp/~y-miyata/mlvwm.html
280 stars 9 forks source link

Initial click in inactive window is lost #24

Closed morgant closed 3 years ago

morgant commented 3 years ago

When clicking on a control within an inactive window, the window is made active, but the click on the control is lost. This requires an additional click from the user and can be confusing as to why the initial click didn't register.

morgant commented 3 years ago

In event.c's handle_button_press(), I was able to tweak whether XAllowEvents() gets called with AsyncPointer or ReplayPointer depending on whether the click was in an inactive window or not. This allowed me to pass the original click event through.

I'm currently debugging adding a SwallowFocusClick config option to make it conditional.

morgant commented 3 years ago

I discovered a bug in config file parsing which would incorrectly match config commands that were partial matches of other config commangs. I was able to fix this and make the config parsing more robust.

I have now committed the handle_button_press() improvements and the new SwallowFocusClick config command, plus updated the manual page. So this is all set.