[gtk+] ScaleButton: make the popup transient to the button's window



commit 4e1b73325d41fc9d709e89a7bec3fc5303135d2e
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Wed Dec 11 15:49:08 2013 +0100

    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

 gtk/gtkscalebutton.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 07f14de..03491b0 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]