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 Protocol #394

Merged
merged 3 commits into from
Oct 27, 2021
Merged

Conversation

PolyMeilex
Copy link
Member

@PolyMeilex PolyMeilex commented Oct 8, 2021

I'm not sure how to check this:

Creating an xdg_toplevel_decoration from an xdg_toplevel which has a buffer attached or committed is a client error, 
and any attempts by a client to attach or manipulate a buffer prior 
to the first xdg_toplevel_decoration.configure event must also be treated as errors.

.get::<self::xdg_handlers::ShellSurfaceUserData>()
.unwrap();
data.xdg_surface.as_ref().post_error(
xdg_surface::Error::NotConstructed as u32,
Copy link
Member

Choose a reason for hiding this comment

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

Off topic:

I do wonder, would having the wayland-rs's post_error take an Into<u32> reduce the amount of as u32 casts

@DemiMarie
Copy link
Contributor

Would it be possible to also implement server-decoration?

@i509VCB
Copy link
Member

i509VCB commented Oct 8, 2021

Poly, my guess for ensuring no existing buffer is attached or commited is get the underlying state of the toplevel's wl_surface and check if some fields on SurfaceData attached to the wl_surface are None or Some?

@PolyMeilex
Copy link
Member Author

Would it be possible to also implement server-decoration?

For sure, that's my plan, but for another PR, as xdg decoration is based on xdg toplevels, and kde's server decoration is based on wl-surfaces.

@PolyMeilex PolyMeilex marked this pull request as ready for review October 16, 2021 18:08
Copy link
Member

@elinorbgr elinorbgr left a comment

Choose a reason for hiding this comment

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

I'm not sure how to check this: ...

This part cannot be checked in Smithay given the helper as you provide it, so it'll have to be delegated to either the compositor itself or some future higher-level abstraction.

@elinorbgr elinorbgr merged commit 63f9a71 into Smithay:master Oct 27, 2021
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.

4 participants