GNOME Bugzilla – Bug 770024
Wayland: subsurface popovers cause warnings
Last modified: 2018-02-10 12:35:19 UTC
Best example is the volume button in the upper left of page2 of the widget-factory. In mutter, the popover shows up fine but clicking on one of the +/- buttons causes the GtkApplicationWindow to be drawn without a current allocation and the GtkScale doesn't properly update (unless one hovers the scale which causes a queue_allocate iirc). In weston, this is much more obvious since the entire window looks unfocused after clicking one of the +/- buttons. There are 2 if-statements in gtkwindow.c that cause the popover to be a subsurface on waylsand, commenting both of them fixes these issues.
Marking this as depending on bug 769937 (port to xdg-shell unstable v6) since we should use non-grabbing "xdg_popup" for popovers.
I bisected this, and sadly ended up on this commit: Add a warning for a broken situation When we emit ::draw, the widget should not have alloc_needed set anymore. If this happens, it indicates a broken situation. Add a warning to help tracking down why this might occur. See https://bugzilla.gnome.org/show_bug.cgi?id=765410
So it looks like I can effectively "solve" this by... 1) commenting the loop at https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c#n7400 . This will cause the popovers to be realized at a later stage, namely in _gtk_window_set_popover_position here: https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c#n12283 . 2) Stop the popover from listening to the "parent's" size-allocate by commenting https://git.gnome.org/browse/gtk+/tree/gtk/gtkpopover.c#n2058 . The call to gtk_popover_update_position here might later cause another gtk_widget_queue_resize() through _gtk_window_set_popover_position during a size-allocate though I'm not sure if that's the cause. This is tested with the volumebutton popovers in the widget-factory. The popovers will now popup in the upper left corner.
Carlos, can you loook at this ?
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.