-
Notifications
You must be signed in to change notification settings - Fork 149
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
GTK3 windows that are snapped to the edge of the screen don't return to their non-tiled state after restoring. #1531
Comments
Personally I can't really test this as my gtk3 version is too old (it doesn't support the tiling notifications at all). |
I can't reproduce this issue. My copy of Endeavour, from Void Linux, uses GTK4. I have several GTK+3 applications, including |
I think it's a GTK version thing. Arch uses 3.24.41 while Void uses 3.24.38. I downloaded 3.24.38 from the archives and sure enough it behaves like you described. |
Very interesting. I think the best long-term solution for labwc would be window actions that allow control over the tiling notification behavior of individual, misbehaving clients in addition to the global switch available now. |
Looking at Gnome/Mutter (45.4 on Wayland with Fedora 39, GTK3 3.24.41) on my machine, the snapping and unsnapping effects do work there correctly with GTK3 apps, whereas the same applications refuse to unset the snapping appearance on labwc. But no idea though if Gnome/mutter just carries a work around or handle that differently. |
This is the PR that introduced tiling support for GTK3 https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6629 released with GTK3 3.24.39 |
A I have a feeling that this requires more investigation and thus might not make it into the next release. I'll keep the milestone around for now but we may adjust it to target 0.7.2 instead. |
Hm..
gnome:
Sadly, the If you feel like spending some more time on this you could use an old toy project of mine that I used to learn about the wayland wire protocol instead of It can be called like |
mmh, your projects works on labwc, but bails out on Gnome :(
|
PS: the only thing that got my attention in the gnome logs where |
Uh, I completely missed that! That is indeed some private GTK / Gnome protocol and could very well explain why it works on gnome but not on labwc. Maybe its really a bug in (older?) versions of GTK3 in that they don't restore the edges when untiled using the official xdg protocol. |
Based on https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/wayland/protocol/gtk-shell.xml?ref_type=heads#L55 I guess looks indeed like that. |
Side note: Wlroots used to have an internal workaround in that if a client didn't support tiling notifications wlroots just sent a fake maximized state (that for the most part has the same effect as tiled on all edges but may have subtle differences like showing an un-maximize button in the CSD). But AFAIR they removed that workaround and left it up to the compositors to either do the same or don't fake it. This would not solve this issue though because here GTK claims to support the tiling notifications but apparently does not implement it correctly based on the evidence I saw so far. |
Hi @emilio , sorry for pinging you directly. Since you wrote https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6629 with other compositors than mutter in mind (well, according to the PR description) this might be interesting for you. |
Sure, I can try to take a poke, I can repro this. |
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6952 is the fix for this. Ironically a related fix (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6742) which also affects gtk4 (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6745) would've papered over this issue. |
Thanks a lot for directly addressing this, very cool! |
@emilio great. Thanks! Closing this as it will be fixed via a future GTK3 release. |
GTK3 3.24.42 has been released recently and with this version the corners return nicely rounded when un-tiling. Now we just need the SSD corners to show (conditionally) the same behavior and all is beautiful consistent. |
They remain squared and the shadows are gone. I didn't notice this before because I just happened to be using a square theme that didn't have any shadows to begin with. As a workaround I just set 'notifyClient' to never for now.
I thought it was weird because I remember seeing a video of it working on that feature's PR but then I noticed the demo was made with a GTK4 app (Nautilus) so I tried the same (gnome-todo/endeavour) and that one worked fine. Only GTK3 apps have this problem for me.
The text was updated successfully, but these errors were encountered: