Commit 669d0685 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Handle the case that the protocol version in the context is not set yet.

2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (gdk_drag_motion): Handle the
	case that the protocol version in the context is not
	set yet.  (#157123, James Henstridge)
parent 253f6836
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion): Handle the
case that the protocol version in the context is not
set yet. (#157123, James Henstridge)
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
......
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion): Handle the
case that the protocol version in the context is not
set yet. (#157123, James Henstridge)
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
......
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion): Handle the
case that the protocol version in the context is not
set yet. (#157123, James Henstridge)
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
......
2004-11-03 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (gdk_drag_motion): Handle the
case that the protocol version in the context is not
set yet. (#157123, James Henstridge)
* gtk/gtktreeview.c (gtk_tree_view_search_activate): Don't
try to activate a node if the cursor is not valid.
......
......@@ -3231,7 +3231,27 @@ gdk_drag_motion (GdkDragContext *context,
if (private->old_actions != possible_actions)
private->xdnd_actions_set = FALSE;
if (protocol == GDK_DRAG_PROTO_XDND && private->version == 0)
{
/* This ugly hack is necessary since GTK+ doesn't know about
* the XDND protocol version, and in particular doesn't know
* that gdk_drag_find_window_for_screen() has the side-effect
* of setting private->version, and therefore sometimes call
* gdk_drag_motion() without a prior call to
* gdk_drag_find_window_for_screen(). This happens, e.g.
* when GTK+ is proxying DND events to embedded windows.
*/
if (dest_window)
{
GdkDisplay *display = GDK_WINDOW_DISPLAY (dest_window);
xdnd_check_dest (display,
GDK_DRAWABLE_XID (dest_window),
&private->version);
}
}
/* When we have a Xdnd target, make sure our XdndActionList
* matches the current actions;
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment