diff --git a/ChangeLog b/ChangeLog index 6fe778221e..a339e04bbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Mar 13 10:49:46 2004 Owen Taylor + + * 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 * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change; diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6fe778221e..a339e04bbc 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sat Mar 13 10:49:46 2004 Owen Taylor + + * 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 * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change; diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6fe778221e..a339e04bbc 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sat Mar 13 10:49:46 2004 Owen Taylor + + * 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 * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change; diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6fe778221e..a339e04bbc 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sat Mar 13 10:49:46 2004 Owen Taylor + + * 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 * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change; diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6fe778221e..a339e04bbc 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sat Mar 13 10:49:46 2004 Owen Taylor + + * 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 * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change; diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 146eb2f509..8e8fa7b7fb 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -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;