For GTK_IS_PLUG toplevels, call gdk_window_get_origin() not

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)
This commit is contained in:
Owen Taylor 2004-03-13 16:27:36 +00:00 committed by Owen Taylor
parent fe3558c786
commit fadaa65145
6 changed files with 53 additions and 1 deletions

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;