After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738891 - Use GDK_WINDOW_SUBSURFACE for popovers
Use GDK_WINDOW_SUBSURFACE for popovers
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkPopover
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
: 741936 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-10-20 18:19 UTC by Carlos Garnacho
Modified: 2014-12-24 21:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Use subsurfaces for popovers on wayland (4.38 KB, patch)
2014-10-20 18:20 UTC, Carlos Garnacho
committed Details | Review
popover: Add a missing #ifdef (934 bytes, patch)
2014-12-24 14:11 UTC, Ting-Wei Lan
accepted-commit_now Details | Review

Description Carlos Garnacho 2014-10-20 18:19:10 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.
Comment 1 Carlos Garnacho 2014-10-20 18:20:06 UTC
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.
Comment 2 Matthias Clasen 2014-10-21 03:26:52 UTC
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...
Comment 3 Carlos Garnacho 2014-10-21 14:47:57 UTC
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 :(
Comment 4 Carlos Garnacho 2014-11-23 12:48:18 UTC
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.
Comment 5 Matthias Clasen 2014-12-05 02:29:47 UTC
Review of attachment 288979 [details] [review]:

I think we should go with this for now.
Comment 6 Carlos Garnacho 2014-12-23 13:32:08 UTC
Attachment 288979 [details] pushed as 96f7c11 - window: Use subsurfaces for popovers on wayland
Comment 7 Ting-Wei Lan 2014-12-24 13:55:16 UTC
Attachment 288979 [details] causes undefined reference to `GDK_IS_WAYLAND_DISPLAY'.
Comment 8 Ting-Wei Lan 2014-12-24 14:11:43 UTC
Created attachment 293322 [details] [review]
popover: Add a missing #ifdef
Comment 9 Emmanuele Bassi (:ebassi) 2014-12-24 14:14:07 UTC
Review of attachment 293322 [details] [review]:

looks good.
Comment 10 Emmanuele Bassi (:ebassi) 2014-12-24 14:17:46 UTC
re-opening, so it gets noticed.
Comment 11 Allison Karlitskaya (desrt) 2014-12-24 14:19:33 UTC
*** Bug 741936 has been marked as a duplicate of this bug. ***
Comment 12 Ting-Wei Lan 2014-12-24 14:20:45 UTC
Attachment 293322 [details] pushed as 2c6ac1f - popover: Add a missing #ifdef