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

Conversation

Projects
None yet
3 participants
@vberger
Copy link
Contributor

vberger commented Jul 27, 2018

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

This comment has been minimized.

Copy link

emersion commented Jul 27, 2018

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

This comment has been minimized.

@emersion

emersion Jul 27, 2018

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.

This comment has been minimized.

@vberger

vberger Jul 27, 2018

Contributor

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);

This comment has been minimized.

@emersion

emersion Jul 27, 2018

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.

This comment has been minimized.

@vberger

vberger Jul 27, 2018

Contributor

Right, indeed. This will be more convoluted to implement though.

@newpavlov

This comment has been minimized.

Copy link

newpavlov commented Jul 27, 2018

Gnome on Wayland officially will not support xdg-decorations.

@vberger

This comment has been minimized.

Copy link
Contributor

vberger commented Jul 27, 2018

@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

This comment has been minimized.

Copy link

newpavlov commented Jul 27, 2018

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

@vberger vberger merged commit b442c27 into master Jul 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@trimental trimental referenced this pull request Aug 15, 2018

Closed

Server-side decorations #31

@vberger vberger deleted the server_decorations branch Nov 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment