window: better evaluate when to block Solitary - #16144
Conversation
| return nullptr; | ||
| } | ||
|
|
||
| SP<CWLSurfaceResource> CWindow::getDirectScanoutResource() const { |
There was a problem hiding this comment.
what's the difference between this and solitary resource? They are to achieve the same thing
There was a problem hiding this comment.
I was using getSolitaryResource as a fallback during testing.
Let me try and implement this into that instead.
|
Made it so it checks in 2 steps before denying solitary. The helper function I added in the first commit made it easier because it would only run if So now, Via Tested browsers/terminal emus/random apps, they all got Solitary properly when appropriate and couldn't find any glitches myself. Being on an AMD GPU, obviously this needs testing with nvidia and/or various DS/VRR setting combos. For me it works as expected, or at least, I couldn't find a weird scenario where it causes issues. |
Solitary
|
Still getting a black screen on GE-Proton11-6 when DS is OFF but game is solitary. Also unrelated really, but solitary is also getting randomly blocked by "other workspaces" when a special workspace simply exists, even if it's not active. That has been happening forever though. |
Describe your PR, what does it fix/add?
Another attempt at #16131
After #15958 and the release of GE-Proton 11-6 which fixes Steam overlay in wine-wayland, Solitary is denied for Proton because of an empty surface that is created.
This PR adds a helper function for the subsurface buffer being empty before denying Solitary and allows Direct Scanout to engage. When the, now working, Steam Overlay is brought up, Hyprland correctly blocks Solitary and Direct Scanout until the Overlay is closed.
Tested with the following:
direct_scanout = 1nullptrfor becauseif (surf && (surf->m_current.buffer || surf->m_mapped)), blocking Solitary correctly, and rendering the overlay and the mouse while everything can be interacted with properly.direct_scanout = 0This is where my previous attempt fell short. On this PR, with the changes to
Renderer.cppwe fall back to the correct subsurface to render instead of the empty dummy one.Everything else already worked as expected anyway.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Again, needs testing in case I missed something obvious or there is an edge case I haven't thought of.
Is it ready for merging, or does it need work?
Possibly ready. Maybe the code can be trimmed down a bit. I'll take a look at it again hopefully in a couple of days when I'm going to be back from a trip.