Open Drakulix opened 3 days ago
Good news fixes minecraft from my testing bad news it seems all my steam games are broken. :| I'm blaming steam
https://github.com/pop-os/cosmic-comp/issues/434 should now also be fixed
More updates that slightly fix behaviour, but still doesn't restore most windows properly...
Draft until it works completely to not break anything currently working by merging a subset of fixes.
This replace
method seems like a nice and simple solution to the leave/enter issue with fullscreening.
Though it does mean that when the WlSurface
isn't changed, enter
/leave
/modifiers
also aren't called on the targets that delegate to WlSurface
, which could change behavior if they do anything other than call enter
/leave
/modifiers
on the WlSurface
.
I think that's not a problem with the current targets, but is something to keep in mind.
This seems to fix the majority of minimize-bugs happening with a lot of games. (Where maximizing the window immediately minimizes it again.)
The culprit was the
wl_keyboard::leave
event, causing the app to register a focus loss, when we switched betweenKeyboardTarget::Element
andKeyboardTarget::Fullscreen
. (Confusingly most games seem to unfullscreen themselves before minimizing and restore fullscreen state after unminimizing... causing this weird transition in our code.)This skips the set of events (thanks to https://github.com/Smithay/smithay/pull/1479), when the new target represents the same surface, which should be fine?!
Dunno, this probably needs some more testing to see, if it doesn't break other apps, but first tests seem promising.
Ref: