xwm: support _NET_WM_OPAQUE_REGION#2016
Conversation
| let mut guard = states.cached_state.get::<SurfaceAttributes>(); | ||
| let attrs = guard.pending(); | ||
| attrs.opaque_region = opaque_region; | ||
| }); |
There was a problem hiding this comment.
Hmm, while it would be nice to lock any opaque-region updates to commits, I am not sure those are meant to be applied atomically.
Does the spec say anything about new contents and when to apply changes to __NET_WM_OPAQUE_REGION? Did you see any updates to this without content changes in your testing?
There was a problem hiding this comment.
Here is the spec: https://specifications.freedesktop.org/wm/1.5/ar01s05.html#id-1.6.19
... which I appear to have misread; looks like it's a list of rectangles, not just a single one, so I'll update to fix that.
I guess in general on X11 we don't have the same sort of synchronization between window properties and painting as we do on Wayland, so the compositing manager presumably should apply it as soon as it "sees" the property. That means the client has to have already painted the window in a way that matches the values it sets in this property.
e796b0e to
9ce90ef
Compare
|
Ok, pushed a fix so it will collect as many rectangles as are in the property. I also refactored it a bit: noticed that there was already a path in For testing, I wrote a quick That didn't work (that is, it blended properly underneath the entire window), so I added debugging prints in Just now I added a few more debugging prints, and I've discovered that the pre-commit hook I added isn't getting called at all... realized I should have that in So back to the test program: now it works as expected: smithay doesn't blend below the opaque regions in the window, so even though they're painted as partially transparent, I can't see other window content beneath the area where those rects are set as the opaque region. The test program also updates |
9ce90ef to
6e9bb83
Compare
X11 clients can set this property on their window to indicate a single fully-opaque region for the window.
6e9bb83 to
42f0943
Compare

Description
X11 clients can set this property on their window to indicate a single fully-opaque region for the window.
I'm not sure if this is actually the right way to propagate the opaque region through; would appreciate some guidance if not.
Checklist