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
tree/view: Do not clip to geometry if using CSD #8033
base: master
Are you sure you want to change the base?
Conversation
struct wlr_box clip = {0}; | ||
if (clip_to_geometry) { | ||
clip = (struct wlr_box){ | ||
.x = con->view->geometry.x, |
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.
I think it should just be using con->current.content_x
instead of con->view->geometry.x
here.
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.
Tried this but it did not work properly. Looks like content_x
and content_y
are absolute coordinates, while subsurface_tree_set_clip
expects surface-local coordinates.
The new revision passes |
I think the only difference between clipping with the geometry size instead of the |
I've restored the patch to use |
If a floating window is using CSD, the geometry should not be used to define the clipping region. Otherwise drop shadows and such may be clipped excessively.
As of commit 9da295c, surfaces of
xdg_toplevel
s are clipped to a region defined by the geometry. This causes drop shadows of floating windows to be cut off, as seen with gnome-calculator against a white background:This PR will avoid clipping if a
sway_view
is in a floating container and using CSD.