-
Notifications
You must be signed in to change notification settings - Fork 81
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
Server decorations #20
Conversation
Tested with swaywm/wlroots#1053, seems to work well! To change the compositor's preference, change |
src/window/mod.rs
Outdated
} | ||
|
||
/// Create a new window wrapping a given wayland surface as its main content and using | ||
/// server decorations if available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set the client's preference to SSD if you prefer to use SSD. Right now the client preference is not set, so the compositor decides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My goal with that was mostly to aim for "follow the compositor's preference". But yeah, I need to clarify what policy to actually follow.
src/window/mod.rs
Outdated
} else { | ||
// we must be the decorators, to be able to not | ||
// show any decoration | ||
dec.set_mode(Mode::ClientSide); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more complicated to implement, but if you don't want to be decorated, you should destroy the decoration object. The compositor always has the last word wrt decoration mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, indeed. This will be more convoluted to implement though.
Gnome on Wayland officially will not support xdg-decorations. |
@newpavlov Do you mean this as an opinion against implementing it in SCTK? My approach is to target maximal compatibility. Gnome has its opinion on how clients should behave and look like, but Gnome is also not the only player in the field. If a compositor supports SSD, I see no downside on using them, especially from the point of view of the users of SCTK-based apps. |
No, it's just a notice for those who hope to use SSD on Gnome. |
fixes #1
It only work with the
xdg-decorations
, which works with the stagexdg-shell
protocol.Not sure if there is already a compositor implementing both for testing...