]> Pileus Git - ~andy/gtk/commitdiff
For GTK_IS_PLUG toplevels, call gdk_window_get_origin() not
authorOwen Taylor <otaylor@redhat.com>
Sat, 13 Mar 2004 16:27:36 +0000 (16:27 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 13 Mar 2004 16:27:36 +0000 (16:27 +0000)
Sat Mar 13 10:49:46 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): For
        GTK_IS_PLUG toplevels, call gdk_window_get_origin()
        not gtk_window_get_position, as a hackround for not
        having accurate notification of window position for
        embedded windows. (#136112, Dan Winship)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkdnd.c

index 6fe778221e08a3360dc945b92d45a7fd94ae0794..a339e04bbc29d0646eb1bf7885d0ac2f4f3cacf1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Mar 13 10:49:46 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): For
+       GTK_IS_PLUG toplevels, call gdk_window_get_origin() 
+       not gtk_window_get_position, as a hackround for not
+       having accurate notification of window position for
+       embedded windows. (#136112, Dan Winship)
+
 Sat Mar 13 10:34:03 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change;
index 6fe778221e08a3360dc945b92d45a7fd94ae0794..a339e04bbc29d0646eb1bf7885d0ac2f4f3cacf1 100644 (file)
@@ -1,3 +1,11 @@
+Sat Mar 13 10:49:46 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): For
+       GTK_IS_PLUG toplevels, call gdk_window_get_origin() 
+       not gtk_window_get_position, as a hackround for not
+       having accurate notification of window position for
+       embedded windows. (#136112, Dan Winship)
+
 Sat Mar 13 10:34:03 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change;
index 6fe778221e08a3360dc945b92d45a7fd94ae0794..a339e04bbc29d0646eb1bf7885d0ac2f4f3cacf1 100644 (file)
@@ -1,3 +1,11 @@
+Sat Mar 13 10:49:46 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): For
+       GTK_IS_PLUG toplevels, call gdk_window_get_origin() 
+       not gtk_window_get_position, as a hackround for not
+       having accurate notification of window position for
+       embedded windows. (#136112, Dan Winship)
+
 Sat Mar 13 10:34:03 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change;
index 6fe778221e08a3360dc945b92d45a7fd94ae0794..a339e04bbc29d0646eb1bf7885d0ac2f4f3cacf1 100644 (file)
@@ -1,3 +1,11 @@
+Sat Mar 13 10:49:46 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): For
+       GTK_IS_PLUG toplevels, call gdk_window_get_origin() 
+       not gtk_window_get_position, as a hackround for not
+       having accurate notification of window position for
+       embedded windows. (#136112, Dan Winship)
+
 Sat Mar 13 10:34:03 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change;
index 6fe778221e08a3360dc945b92d45a7fd94ae0794..a339e04bbc29d0646eb1bf7885d0ac2f4f3cacf1 100644 (file)
@@ -1,3 +1,11 @@
+Sat Mar 13 10:49:46 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_dest_handle_event): For
+       GTK_IS_PLUG toplevels, call gdk_window_get_origin() 
+       not gtk_window_get_position, as a hackround for not
+       having accurate notification of window position for
+       embedded windows. (#136112, Dan Winship)
+
 Sat Mar 13 10:34:03 2004  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change;
index 146eb2f509ac21c78194a78996ca42ab0d2f7b32..8e8fa7b7fbe2cf9bfb10e923c2040416d3844489 100644 (file)
@@ -33,6 +33,7 @@
 #include "gtkimage.h"
 #include "gtkinvisible.h"
 #include "gtkmain.h"
+#include "gtkplug.h"
 #include "gtkstock.h"
 #include "gtkwindow.h"
 
@@ -1082,7 +1083,18 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
              }
          }
 
-       gdk_window_get_position (toplevel->window, &tx, &ty);
+#ifdef GDK_WINDOWING_X11
+       /* Hackaround for: http://bugzilla.gnome.org/show_bug.cgi?id=136112
+        *
+        * Currently gdk_window_get_position doesn't provide reliable
+        * information for embedded windows, so we call the much more
+        * expensive gdk_window_get_origin().
+        */
+       if (GTK_IS_PLUG (toplevel))
+         gdk_window_get_origin (toplevel->window, &tx, &ty);
+       else
+#endif /* GDK_WINDOWING_X11 */
+         gdk_window_get_position (toplevel->window, &tx, &ty);
 
        data.x = event->dnd.x_root - tx;
        data.y = event->dnd.y_root - ty;