[Wayland] Add support for autohide - #1584
Conversation
lukefromdc
left a comment
There was a problem hiding this comment.
This works mostly as expected. Note that in both x11 and wayland some themes do not show the buttons as visually distinct from the rest of the panel when not clicked on, but all show them with clicked on, some themes visually separate the buttons always, and in all cases the hide arrows are shown.
One issue came up: testing with two panels showing, I found that when a top or left panel was hidden, wayfire's default background showed rather than caja's background.
|
Should be fixed now |
|
Still getting the same behavior with this installed: wayfire's native background showing behind top and left
panels when hidden
|
|
Since I can't reproduce this issue - please test latest commit |
There was a problem hiding this comment.
This fixed it. The only remaining issue is that caja's desktop jumps by the width of the panel while in the process of autohiding/showing a top or left panel. Same as how caja jumps when first adding a top or left panel and always has as far as I know.
Not sure that's even possible to fix however given we don't have the root window background like in x11. Since we have to release the exclusive zone to get the background under it in wayland, the price is that caja jumps while the autohide is in the process of showing or hiding the panel. The start and end positions however are identical. Using the hide buttons creates no such problems, they now work perfectly.
My suspicion is that if we tried to delay taking/releasing the exclusive zone until the auto show/hide process was done, we'd get wayfire's background showing behind the panel during that process.
Note that there have always been issues with panel struts. Not going to let the perfect be the enemy of the good here. If someone does find a way to make caja stay put but still cover the whole background while the panel is autohiding/showing, they can open a new PR for it. Not sure if that would have to be here or in caja itself though, and like I said that may not be possible. Anyway I got no other issues with this after the last commit, merging
Tested with 1, 2 and 4 panels. Not tested on multi-monitor setup