Skip to content
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

Merged
merged 3 commits into from
Jul 30, 2018
Merged

Server decorations #20

merged 3 commits into from
Jul 30, 2018

Conversation

elinorbgr
Copy link
Member

fixes #1

It only work with the xdg-decorations, which works with the stage xdg-shell protocol.

Not sure if there is already a compositor implementing both for testing...

@emersion
Copy link

Tested with swaywm/wlroots#1053, seems to work well! To change the compositor's preference, change WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE in rootston/xdg_shell.c line 491 to WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE.

}

/// Create a new window wrapping a given wayland surface as its main content and using
/// server decorations if available

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.

Copy link
Member Author

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.

} else {
// we must be the decorators, to be able to not
// show any decoration
dec.set_mode(Mode::ClientSide);

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.

Copy link
Member Author

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.

@newpavlov
Copy link

Gnome on Wayland officially will not support xdg-decorations.

@elinorbgr
Copy link
Member Author

@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.

@newpavlov
Copy link

No, it's just a notice for those who hope to use SSD on Gnome.

@elinorbgr elinorbgr merged commit b442c27 into master Jul 30, 2018
@trimental trimental mentioned this pull request Aug 15, 2018
@elinorbgr elinorbgr deleted the server_decorations branch November 12, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate KDE's decoration protocol
3 participants