]> Pileus Git - ~andy/gtk/commitdiff
Make it work better with multiple monitors.
authorTor Lillqvist <tml@novell.com>
Mon, 21 May 2007 02:58:16 +0000 (02:58 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 21 May 2007 02:58:16 +0000 (02:58 +0000)
2007-05-21  Tor Lillqvist  <tml@novell.com>

* gtk/gtkscalebutton.c (gtk_scale_popup): Make it work better with
multiple monitors.

svn path=/trunk/; revision=17881

ChangeLog
gtk/gtkscalebutton.c

index 06a74aaad1766a05cc24f10debae72be5e0059d8..8ed3f27e19b4b212cea83a8e5e9726cee078ec8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-21  Tor Lillqvist  <tml@novell.com>
+
+       * gtk/gtkscalebutton.c (gtk_scale_popup): Make it work better with
+       multiple monitors.
+
 2007-05-20  Attilio Fiandrotti  <attilio.fiandrotti@gmail.com>
 
         * gdk/directfb/gdkwindow-directfb.c:
index 307a253df1304bd02ab4599cd9956cb3a847f556..1ac3db438ee8698f04b6fc45f4065455866092dc 100644 (file)
@@ -694,8 +694,8 @@ gtk_scale_popup (GtkWidget *widget,
 
       d = GTK_WIDGET (priv->dock);
       monitor = gdk_screen_get_monitor_at_point (screen,
-                                                button_event->x,
-                                                button_event->y);
+                                                button_event->x_root,
+                                                button_event->y_root);
       gdk_screen_get_monitor_geometry (screen, monitor, &rect);
 
       y += button_event->y;
@@ -706,7 +706,7 @@ gtk_scale_popup (GtkWidget *widget,
 
       if (x < rect.x)
        x = rect.x;
-      else if (x + d->allocation.width > rect.width - rect.x)
+      else if (x + d->allocation.width > rect.width + rect.x)
        x = rect.x + rect.width - d->allocation.width;
     }