GNOME Bugzilla – Bug 738891
Use GDK_WINDOW_SUBSURFACE for popovers
Last modified: 2014-12-24 21:00:03 UTC
I'm attaching a patch to make popovers use subsurfaces, which allows these to extend outside the parent window area, and still stay conveniently attached. NB: During the development of this patch, I also found a number of bugs that sprang in mutter breaking this in different degrees. I've filed bugs #738887, #738888, #738889 and #738890 about these.
Created attachment 288979 [details] [review] window: Use subsurfaces for popovers on wayland On the wayland backend, set up GDK_WINDOW_SUBSURFACE windows for popovers. In the popover code, the popover-relative-to-parent calculation had to be tweaked, and it's been made to always prefer the given popover position, since there's no sizing limitations.
Review of attachment 288979 [details] [review]: Shouldn't we still constrain the popover position to not fall outside the monitor/workarea ? Of course, doing that on Wayland isn't exactly a solved problem...
Right... and I think there's even more problems around this than there ever were on menus, which are most commonly static, here you can always drag the window to create tricky situations for the subsurface. How the subsurface is currently attached to the parent surface (ie. just x/y) seems unfortunately a bit too simplistic if we want to do anything more elaborate there :(
With bug #736742 closed, I think I can call all blocking issues gone. There's only a pending mutter-side issue in bug #738890 hindering this, but it's not specific to popovers either.
Review of attachment 288979 [details] [review]: I think we should go with this for now.
Attachment 288979 [details] pushed as 96f7c11 - window: Use subsurfaces for popovers on wayland
Attachment 288979 [details] causes undefined reference to `GDK_IS_WAYLAND_DISPLAY'.
Created attachment 293322 [details] [review] popover: Add a missing #ifdef
Review of attachment 293322 [details] [review]: looks good.
re-opening, so it gets noticed.
*** Bug 741936 has been marked as a duplicate of this bug. ***
Attachment 293322 [details] pushed as 2c6ac1f - popover: Add a missing #ifdef