ScaleButton: make the popup transient to the button's window

Fixes the popup positioning on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=720256
This commit is contained in:
Emilio Pozuelo Monfort 2013-12-11 15:49:08 +01:00 committed by Matthias Clasen
parent 4d6c509943
commit 4e1b73325d

View File

@ -911,6 +911,9 @@ gtk_scale_popup (GtkWidget *widget,
x += allocation.x;
y += allocation.y;
gtk_window_set_transient_for (GTK_WINDOW (priv->dock),
GTK_WINDOW (gtk_widget_get_toplevel (widget)));
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
gtk_window_move (GTK_WINDOW (priv->dock), x, y - (SCALE_SIZE / 2));
else