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 756670 - Popover is shown below clutter widget after tab switch from Gtk.Notebook
Popover is shown below clutter widget after tab switch from Gtk.Notebook
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkPopover
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-15 21:43 UTC by Marcel Tiede
Modified: 2015-11-03 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ust click on "Mini-Mode" in the popover to see that it is drawn behind the black stage of the GtkClutter.Embed. (2.16 KB, text/x-vala)
2015-10-15 21:43 UTC, Marcel Tiede
  Details
GtkWindow: make popover stacking explicit (4.01 KB, patch)
2015-10-22 17:04 UTC, Carlos Garnacho
committed Details | Review
popover: Request raise on ::show (773 bytes, patch)
2015-10-22 17:04 UTC, Carlos Garnacho
committed Details | Review
texthandle: Request raising of text handle popovers. (953 bytes, patch)
2015-10-22 17:05 UTC, Carlos Garnacho
committed Details | Review

Description Marcel Tiede 2015-10-15 21:43:40 UTC
Created attachment 313405 [details]
ust click on "Mini-Mode" in the popover to see that it is drawn behind the black stage of the GtkClutter.Embed.

After switching the Tab of a Gtk.Notebook the popover is shown below the gtk clutter embed.

Examplecode see attachments. Just click on "Mini-Mode" in the popover to see that it is drawn behind the black stage of the GtkClutter.Embed. The popover should stay on top of it.

To compile use: valac --pkg gtk+-3.0 --pkg clutter-gtk-1.0 test.vala
Comment 1 Carlos Garnacho 2015-10-22 17:04:50 UTC
Created attachment 313877 [details] [review]
GtkWindow: make popover stacking explicit

The list of popovers will specify the stacking order, a
_gtk_window_raise_popover() private call has been added so popover
widgets can request being on top.

Also, the stacking on popovers is ensured on gtk_window_size_allocate(),
after the size/stacking changes on the child widget have finished, this
will ensure popovers are kept on top of window contents.
Comment 2 Carlos Garnacho 2015-10-22 17:04:55 UTC
Created attachment 313878 [details] [review]
popover: Request raise on ::show

This way latest shown popovers are ensured to be on top.
Comment 3 Carlos Garnacho 2015-10-22 17:05:01 UTC
Created attachment 313879 [details] [review]
texthandle: Request raising of text handle popovers.
Comment 4 Carlos Garnacho 2015-10-22 17:15:08 UTC
These patches fix the bug on X11, not on wayland yet... there's a number of problems there:

- The wayland backend is not restacking subsurfaces on ::raise/::lower
- raise() semantics are hard to implement over wl_subsurface.place_above(), we may not have the full list of subsurfaces on gdk (and this testcase is also good at showing that, GtkClutterEmbed creates its own wl_subsurface, hidden from GDK for most purposes), so it's not possible to pick one in order to place ours above.

This IMO goes through making it possible to request raising past all windows without knowing beforehand the previous one, it is already possible to implement ::lower knowing nothing else than the subsurface and parent windows.
Comment 5 Matthias Clasen 2015-10-25 17:54:27 UTC
Review of attachment 313877 [details] [review]:

ok
Comment 6 Matthias Clasen 2015-10-25 17:54:41 UTC
Review of attachment 313878 [details] [review]:

ok
Comment 7 Matthias Clasen 2015-10-25 17:55:01 UTC
Review of attachment 313879 [details] [review]:

ok
Comment 8 Matthias Clasen 2015-11-03 12:26:16 UTC
Pushed with a slight fix for the second patch (added a NULL check)

Attachment 313877 [details] pushed as fa3e0be - GtkWindow: make popover stacking explicit
Attachment 313878 [details] pushed as 9d1b8df - popover: Request raise on ::show
Attachment 313879 [details] pushed as 4f61fd0 - texthandle: Request raising of text handle popovers.