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

Implement xdg-decoration #45

Merged
merged 1 commit into from
Feb 21, 2019
Merged

Implement xdg-decoration #45

merged 1 commit into from
Feb 21, 2019

Conversation

Hjdskes
Copy link
Collaborator

@Hjdskes Hjdskes commented Feb 17, 2019

This commit adds a commandline switch (-d) to disable client side decorations, if possible. In this case, Cage will not draw any decorations of its own, in order to maximize screen real estate.

The default behavior remains the same, i.e., if -d is not passed, clients will draw their client side decorations, if any.

Fixes #32.

@Hjdskes Hjdskes force-pushed the xdg-decoration branch 2 times, most recently from f96e507 to d0c2e91 Compare February 17, 2019 21:27
@cedws
Copy link

cedws commented Feb 20, 2019

Thanks for working on this.

The help message is a bit broken:
image

With the parameter -d, CSDs are still being drawn in firefox-wayland:
image

cage.c Outdated
@@ -84,6 +85,7 @@ usage(FILE *file, const char *cage)
{
fprintf(file, "Usage: %s APPLICATION\n"
"\n"
" -d\t Don't draw client side decorations, when possible"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\n here to fix the help message.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch.

cage.c Show resolved Hide resolved
server.h Show resolved Hide resolved
This commit adds a commandline switch (-d) to disable client side
decorations, if possible. In this case, Cage will not draw any
decorations of its own, in order to maximize screen real estate.

The default behavior remains the same, i.e., if -d is not passed,
clients will draw their client side decorations, if any.

Fixes #32
@Hjdskes
Copy link
Collaborator Author

Hjdskes commented Feb 21, 2019

With the parameter -d, CSDs are still being drawn in firefox-wayland:

This is because Firefox does not (yet?) implement the xdg decoration protocol. This feature only works with clients that implement the protocol. One such example client is examples/toplevel-decoration in the wlroots source tree.

@Hjdskes Hjdskes merged commit 2166fbd into master Feb 21, 2019
@Hjdskes Hjdskes deleted the xdg-decoration branch February 21, 2019 08:15
@cedws
Copy link

cedws commented Feb 21, 2019

That would make sense, but Sway manages to hide CSDs for firefox-wayland. Is that being done with another protocol then?

@Hjdskes
Copy link
Collaborator Author

Hjdskes commented Feb 22, 2019

I asked in #sway-devel. GTK still uses server-decoration, a deprecated protocol which is the predecessor to xdg-decoration. I'll look into supporting server-decoration as well to cover all GTK clients, and simultaneously I'll look into patching GTK to use xdg-decoration instead.

@cedws
Copy link

cedws commented Feb 22, 2019

Ah okay, this is more clear now. So in theory with xdg-decoration and server-decoration implemented, this should cover all applications with CSDs.

Hjdskes added a commit that referenced this pull request Feb 23, 2019
GTK still uses the (now deprecated) server-decoration protocol, which is
the predecessor to xdg-decoration. Hence, with this commit Cage now also
hides decorations on applications such as Firefox.

Fixes #47, see also
#45 (comment).
Hjdskes added a commit that referenced this pull request Feb 23, 2019
GTK still uses the (now deprecated) server-decoration protocol, which is
the predecessor to xdg-decoration. Hence, with this commit Cage now also
hides decorations on applications such as Firefox.

Fixes #47, see also
#45 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants