-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sloppy focus issues around desktop windows (file managers, etc), fix uninitialized windowType #617
Conversation
The rationale here is that the user will probably think of desktop windows with icons and wallpaper images as "unoccupied space" and not just another window. Addresses joewing#613 (comment)
This allows the user's mouse to pass over background windows provided by file managers etc. (usually things with icons, rubber band selections, and wallpaper images) without JWM's sloppy focus modes transferring focus to them. This helps maintain the illusion that such windows are neutral, unoccupied space and not just a big window. Such background windows can still be clicked to focus, allowing keyboard interaction with file icons and suchlike. fixes joewing#613
For some reason, I wasn't able to test with If you prefer, I can reimplement this patch and investigate. |
ReadWindowState() was creating ClientState structs without initializing every field, so windowType was typically zero (might not be: this is undefined behaviour I think). Zero is the same as WINDOW_TYPE_DESKTOP, which was breaking my checks for whether a window is a desktop window. For some reason, all normal windows were initialized that way too. Default it to WINDOW_TYPE_NORMAL, much like the defaultLayer is defaulted to LAYER_NORMAL.
Looks like @joewing Let me know if you want this rebasing before you accept it, since it changes the same lines twice. |
@joewing Does the exception this branch introduces for desktop windows while in sloppy focus modes need documenting? I don't think the pager stuff does, necessarily. |
This permits explanatory comments, and documents the flow better. Reintroduce tests for LAYER_DESKTOP too, since the logic applies for that too.
I think the logic and behaviour is right now. @joewing |
This looks reasonable to me. Thanks! |
This combines two separate commits that fix some issues with background/desktop windows and JWM's sloppy focus.
The user probably considers background widows, like those provided by file managers, to be something other than a regular window, and might consider sloppy focus to be broken by them (see #613). In point of fact, these windows should probably not receive sloppy focus; however they can still be usefully focussed and interacted with.
Therefore, require clicks before interaction even in sloppy focus mode.
They also may not appreciate a giant rectangle in the pager behind all the other ones. You can't usefully move one of these background filer windows, and it probably shouldn't hide the pager's desktop number either if the current desktop happens to be empty.