Distinguish between "should it be decorated" and "should it use SSD" #1724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
ToggleDecorations
action in Openbox was used to decide whether decorations should be drawn or not. ThekeepBorder
setting is used to decide whether "undecorated" windows should still have a border or not.In Wayland this is more complicated because we have to consider client side decorations (CSD) in addition to the traditional server side decorations (SSD).
Initially,
ToggleDecorations
in labwc toggled SSD on and off. Since support forkeepBorder
was added in #876,ToggleDecorations
cycles through full SSD, only borders, and no SSD. This approach has some issues:<windowRule><action name="ToggleDecorations"/>
would do.Decorate
andUndecorate
actions are supposed to transition toMy proposal is to split this into two different topics:
ToggleDecorations
,Decorate
, andUndecorate
toggle SSD on and off, like before. AddingDecorate
andUndecorate
allows to target a specific state without needing to know the initial state.In addition to that, the new set of actions
ToggleTitlebar
,ShowTitlebar
, andHideTitlebar
can be used to modify the SSD. IfkeepBorder
is off, the border will be hidden along with the titlebar.This gives us all the combinations there are. However, there is some redundancy:
HideTitlebar
withkeepBorder=no
is effectively the same asUndecorate
<windowRules><action name="Undecorate">
is effectively the same as<windowRule serverDecoration="no"/>
i therefore went ahead and removed
keepBorder
again. I did not removeserverDecoration
because I figured that it is more performant/causes less flicker than the corresponding actions.Some examples: