-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow DS for surfaces with inert subsurfaces #12133
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
base: main
Are you sure you want to change the base?
Conversation
0d50e08 to
8c6f6b9
Compare
8c6f6b9 to
84d6c9e
Compare
idea aint stupid, code sux tho |
84d6c9e to
a5dae7c
Compare
a5dae7c to
ff44af9
Compare
ff44af9 to
4eff4de
Compare
bd7e476 to
62cdfe0
Compare
src/protocols/core/Compositor.cpp
Outdated
| if (subsurface.expired() || subsurface->m_surface.expired()) | ||
| return true; | ||
|
|
||
| auto surf = subsurface->m_surface.lock(); |
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.
locking is redundant. Check operator bool on WP and deref a weak
src/protocols/core/Compositor.cpp
Outdated
| bool CWLSurfaceResource::hasVisibleSubsurface() { | ||
| for (auto const& subsurface : m_subsurfaces) { | ||
| if (subsurface) { | ||
| if (subsurface.expired() || subsurface->m_surface.expired()) |
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.
prefer operator bool which is the inverse of expired
62cdfe0 to
91045b6
Compare
Describe your PR, what does it fix/add?
Gets DS working with Gamescope.
gamescope --mangoappdisables DS forsubsurfaces, and toggling it on/off withShift_R+F12works as expected.Note: Gamescope doesn't do hardware cursors with its Wayland backend, so moving the cursor will go in/out of DS. This outcome is the same as Sway, and works fine for games with captured cursors, so I think it's okay. Given that toggling
mangoappdoesn't cause this stutter, it's probably a Gamescope issue.Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
My knowledge of subsurfaces is lacking. If this is stupid, please say so.
Is it ready for merging, or does it need work?
Ready