GtkDialogs not visible with GTK 3.24.17 on Sway and Plasma compositors
Since upgrading to GTK 3.24.17, GtkDialogs are not visible any longer on some Wayland compositors (at least Sway). This affects e.g. pinetry-gnome3
from GnuPG. I have bisected this to commit 7f12dc2b, but it is a different issue than #2572 (closed), the fix proposed there does not help here.
Steps to reproduce
- Install GTK 3.24.17.
- Install pinentry 1.1.0 and run
echo CONFIRM | pinentry-gnome3
, or compile and run the minimal example program below.
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
gtk_init (&argc, &argv);
GtkWidget *dialog = gtk_dialog_new ();
gtk_widget_show_all (dialog);
gtk_main ();
}
Current behavior
With GTK 3.24.17, the application appears to hang indefinitely and shows now dialogue.
Expected outcome
With GTK 3.24.16, a dialogue is shown.
Version information
- Arch Linux
- GTK 3.24.17 installed from the repositories (package version 1:3.24.17-2)
- Wayland compositor: Sway 1.4, installed from the repositories (package version 1:1.4-8)
Additional information
Log output with GTK_DEBUG=builder,geometry,updates
for the demo application (exhibits a crash that is not present when the updates
debug option is not enabled):
Gtk-Message: 16:54:28.346: <interface domain="gtk30">
Gtk-Message: 16:54:28.346: <template class="GtkDialog" parent="GtkWindow">
Gtk-Message: 16:54:28.346: <property name="window-position">
Gtk-Message: 16:54:28.346: </property>
Gtk-Message: 16:54:28.346: <property name="type-hint">
Gtk-Message: 16:54:28.346: </property>
Gtk-Message: 16:54:28.346: <signal name="delete-event" handler="gtk_dialog_delete_event_handler" swapped="no">
Gtk-Message: 16:54:28.346: </signal>
Gtk-Message: 16:54:28.346: <child type="titlebar">
Gtk-Message: 16:54:28.346: set GtkDialog: window-position = ((GtkWindowPosition) GTK_WIN_POS_CENTER_ON_PARENT)
Gtk-Message: 16:54:28.346: set GtkDialog: type-hint = ((GdkWindowTypeHint) GDK_WINDOW_TYPE_HINT_DIALOG)
Gtk-Message: 16:54:28.346: <object class="GtkHeaderBar" id="headerbar">
Gtk-Message: 16:54:28.346: <property name="visible">
Gtk-Message: 16:54:28.346: </property>
Gtk-Message: 16:54:28.346: <property name="show-close-button">
Gtk-Message: 16:54:28.346: </property>
Gtk-Message: 16:54:28.346: </object>
Gtk-Message: 16:54:28.346: created headerbar of type GtkHeaderBar
Gtk-Message: 16:54:28.346: set headerbar: visible = TRUE
Gtk-Message: 16:54:28.346: set headerbar: show-close-button = TRUE
Gtk-Message: 16:54:28.346: </child>
Gtk-Message: 16:54:28.346: adding headerbar to GtkDialog
Gtk-Message: 16:54:28.347: <child>
Gtk-Message: 16:54:28.347: <object class="GtkBox" id="vbox">
Gtk-Message: 16:54:28.347: <property name="visible">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <property name="orientation">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <property name="border-width">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <style>
Gtk-Message: 16:54:28.347: created vbox of type GtkBox
Gtk-Message: 16:54:28.347: set vbox: visible = TRUE
Gtk-Message: 16:54:28.347: set vbox: orientation = ((GtkOrientation) GTK_ORIENTATION_VERTICAL)
Gtk-Message: 16:54:28.347: set vbox: border-width = 0
Gtk-Message: 16:54:28.347: <class name="dialog-vbox">
Gtk-Message: 16:54:28.347: </class>
Gtk-Message: 16:54:28.347: </style>
Gtk-Message: 16:54:28.347: <child>
Gtk-Message: 16:54:28.347: set vbox: border-width = 0
Gtk-Message: 16:54:28.347: set vbox: orientation = ((GtkOrientation) GTK_ORIENTATION_VERTICAL)
Gtk-Message: 16:54:28.347: set vbox: visible = TRUE
Gtk-Message: 16:54:28.347: <object class="GtkBox" id="action_box">
Gtk-Message: 16:54:28.347: <property name="visible">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <style>
Gtk-Message: 16:54:28.347: created action_box of type GtkBox
Gtk-Message: 16:54:28.347: set action_box: visible = TRUE
Gtk-Message: 16:54:28.347: <class name="dialog-action-box">
Gtk-Message: 16:54:28.347: </class>
Gtk-Message: 16:54:28.347: </style>
Gtk-Message: 16:54:28.347: <child>
Gtk-Message: 16:54:28.347: set action_box: visible = TRUE
Gtk-Message: 16:54:28.347: <object class="GtkButtonBox" id="action_area">
Gtk-Message: 16:54:28.347: <property name="visible">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <property name="layout-style">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <property name="hexpand">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: <style>
Gtk-Message: 16:54:28.347: created action_area of type GtkButtonBox
Gtk-Message: 16:54:28.347: set action_area: visible = TRUE
Gtk-Message: 16:54:28.347: set action_area: layout-style = ((GtkButtonBoxStyle) GTK_BUTTONBOX_END)
Gtk-Message: 16:54:28.347: set action_area: hexpand = TRUE
Gtk-Message: 16:54:28.347: <class name="dialog-action-area">
Gtk-Message: 16:54:28.347: </class>
Gtk-Message: 16:54:28.347: </style>
Gtk-Message: 16:54:28.347: </object>
Gtk-Message: 16:54:28.347: set action_area: hexpand = TRUE
Gtk-Message: 16:54:28.347: set action_area: layout-style = ((GtkButtonBoxStyle) GTK_BUTTONBOX_END)
Gtk-Message: 16:54:28.347: set action_area: visible = TRUE
Gtk-Message: 16:54:28.347: <packing>
Gtk-Message: 16:54:28.347: adding action_area to action_box
Gtk-Message: 16:54:28.347: <property name="pack-type">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: </packing>
Gtk-Message: 16:54:28.347: </child>
Gtk-Message: 16:54:28.347: </object>
Gtk-Message: 16:54:28.347: <packing>
Gtk-Message: 16:54:28.347: adding action_box to vbox
Gtk-Message: 16:54:28.347: <property name="pack-type">
Gtk-Message: 16:54:28.347: </property>
Gtk-Message: 16:54:28.347: </packing>
Gtk-Message: 16:54:28.347: </child>
Gtk-Message: 16:54:28.347: </object>
Gtk-Message: 16:54:28.347: </child>
Gtk-Message: 16:54:28.347: adding vbox to GtkDialog
Gtk-Message: 16:54:28.347: </template>
Gtk-Message: 16:54:28.347: </interface>
Gtk-Message: 16:54:28.348: gtk_widget_size_allocate: GtkDialog 0 0 4 4, baseline -1
Gtk-Message: 16:54:28.348: gtk_widget_size_allocate: GtkBox 0 0 4 4, baseline -1
Gtk-Message: 16:54:28.348: gtk_widget_size_allocate: GtkBox 2 3 1 1, baseline -1
Gtk-Message: 16:54:28.348: gtk_widget_size_allocate: GtkButtonBox 2 3 1 1, baseline -1
Gtk-Message: 16:54:28.348: gtk_widget_set_clip: GtkButtonBox 1 2 3 3
Gtk-Message: 16:54:28.348: gtk_widget_set_clip: GtkBox 1 2 3 3
Gtk-Message: 16:54:28.348: gtk_widget_set_clip: GtkBox 1 2 3 3
Gtk-Message: 16:54:28.348: gtk_widget_set_clip: GtkBox 1 2 3 3
Gtk-Message: 16:54:28.348: gtk_widget_set_clip: GtkBox 1 1 3 4
Gtk-Message: 16:54:28.348: gtk_widget_size_allocate: GtkDialog 0 0 4 4, baseline -1
Gtk-Message: 16:54:28.348: gtk_widget_size_allocate: GtkBox 0 0 4 4, baseline -1
(test_gtkdialog:67032): Gdk-CRITICAL **: 16:54:28.350: ../gtk/gdk/wayland/gdkdisplay-wayland.c:1328: mmap'ping shared memory file failed: Invalid argument
Edited by Simon McVittie