mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Ignore all client events that were sent to a window that we don't know
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdnd-x11.c: Ignore all client events that were sent to a window that we don't know about or to a foreign window. (#81543, Young-Ho, Cha)
This commit is contained in:
parent
16fc6b1a26
commit
8d79795203
@ -1,3 +1,9 @@
|
||||
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Ignore all client events that
|
||||
were sent to a window that we don't know about or
|
||||
to a foreign window. (#81543, Young-Ho, Cha)
|
||||
|
||||
Thu Jun 13 12:24:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Ignore all client events that
|
||||
were sent to a window that we don't know about or
|
||||
to a foreign window. (#81543, Young-Ho, Cha)
|
||||
|
||||
Thu Jun 13 12:24:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Ignore all client events that
|
||||
were sent to a window that we don't know about or
|
||||
to a foreign window. (#81543, Young-Ho, Cha)
|
||||
|
||||
Thu Jun 13 12:24:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Ignore all client events that
|
||||
were sent to a window that we don't know about or
|
||||
to a foreign window. (#81543, Young-Ho, Cha)
|
||||
|
||||
Thu Jun 13 12:24:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Ignore all client events that
|
||||
were sent to a window that we don't know about or
|
||||
to a foreign window. (#81543, Young-Ho, Cha)
|
||||
|
||||
Thu Jun 13 12:24:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Jun 13 15:02:49 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdnd-x11.c: Ignore all client events that
|
||||
were sent to a window that we don't know about or
|
||||
to a foreign window. (#81543, Young-Ho, Cha)
|
||||
|
||||
Thu Jun 13 12:24:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
|
||||
|
@ -1770,6 +1770,10 @@ motif_dnd_filter (GdkXEvent *xev,
|
||||
Atom atom;
|
||||
gint16 x_root, y_root;
|
||||
gboolean is_reply;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
/* First read some fields common to all Motif DND messages */
|
||||
|
||||
@ -1910,15 +1914,16 @@ xdnd_status_filter (GdkXEvent *xev,
|
||||
guint32 flags = xevent->xclient.data.l[1];
|
||||
Atom action = xevent->xclient.data.l[4];
|
||||
GdkDragContext *context;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_message ("XdndStatus: dest_window: %#x action: %ld",
|
||||
dest_window, action));
|
||||
|
||||
display = gdk_drawable_get_display (event->any.window);
|
||||
if (!display)
|
||||
return GDK_FILTER_REMOVE;
|
||||
|
||||
context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window);
|
||||
|
||||
if (context)
|
||||
@ -1957,14 +1962,15 @@ xdnd_finished_filter (GdkXEvent *xev,
|
||||
XEvent *xevent = (XEvent *)xev;
|
||||
guint32 dest_window = xevent->xclient.data.l[0];
|
||||
GdkDragContext *context;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_message ("XdndFinished: dest_window: %#x", dest_window));
|
||||
|
||||
display = gdk_drawable_get_display (event->any.window);
|
||||
if (!display)
|
||||
return GDK_FILTER_REMOVE;
|
||||
|
||||
context = gdk_drag_context_find (display, TRUE, xevent->xclient.window, dest_window);
|
||||
|
||||
if (context)
|
||||
@ -2417,8 +2423,8 @@ xdnd_enter_filter (GdkXEvent *xev,
|
||||
GdkEvent *event,
|
||||
gpointer cb_data)
|
||||
{
|
||||
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (event->any.window);
|
||||
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
|
||||
GdkDisplay *display;
|
||||
GdkDisplayX11 *display_x11;
|
||||
XEvent *xevent = (XEvent *)xev;
|
||||
GdkDragContext *new_context;
|
||||
gint i;
|
||||
@ -2428,10 +2434,21 @@ xdnd_enter_filter (GdkXEvent *xev,
|
||||
gulong nitems, after;
|
||||
Atom *data;
|
||||
|
||||
guint32 source_window = xevent->xclient.data.l[0];
|
||||
gboolean get_types = ((xevent->xclient.data.l[1] & 1) != 0);
|
||||
gint version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
|
||||
guint32 source_window;
|
||||
gboolean get_types;
|
||||
gint version;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
source_window = xevent->xclient.data.l[0];
|
||||
get_types = ((xevent->xclient.data.l[1] & 1) != 0);
|
||||
version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
|
||||
|
||||
display = GDK_DRAWABLE_DISPLAY (event->any.window);
|
||||
display_x11 = GDK_DISPLAY_X11 (display);
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_message ("XdndEnter: source_window: %#x, version: %#x",
|
||||
source_window, version));
|
||||
@ -2529,12 +2546,18 @@ xdnd_leave_filter (GdkXEvent *xev,
|
||||
{
|
||||
XEvent *xevent = (XEvent *)xev;
|
||||
guint32 source_window = xevent->xclient.data.l[0];
|
||||
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window));
|
||||
GdkDisplayX11 *display_x11;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_message ("XdndLeave: source_window: %#x",
|
||||
source_window));
|
||||
|
||||
display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window));
|
||||
|
||||
if ((display_x11->current_dest_drag != NULL) &&
|
||||
(display_x11->current_dest_drag->protocol == GDK_DRAG_PROTO_XDND) &&
|
||||
(GDK_DRAWABLE_XID (display_x11->current_dest_drag->source_window) == source_window))
|
||||
@ -2563,13 +2586,19 @@ xdnd_position_filter (GdkXEvent *xev,
|
||||
guint32 time = xevent->xclient.data.l[3];
|
||||
Atom action = xevent->xclient.data.l[4];
|
||||
|
||||
GdkDisplay *display = GDK_DRAWABLE_DISPLAY (event->any.window);
|
||||
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
|
||||
GdkDisplay *display;
|
||||
GdkDisplayX11 *display_x11;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld",
|
||||
source_window, x_root, y_root, time, action));
|
||||
|
||||
display = GDK_DRAWABLE_DISPLAY (event->any.window);
|
||||
display_x11 = GDK_DISPLAY_X11 (display);
|
||||
|
||||
if ((display_x11->current_dest_drag != NULL) &&
|
||||
(display_x11->current_dest_drag->protocol == GDK_DRAG_PROTO_XDND) &&
|
||||
@ -2606,12 +2635,18 @@ xdnd_drop_filter (GdkXEvent *xev,
|
||||
XEvent *xevent = (XEvent *)xev;
|
||||
guint32 source_window = xevent->xclient.data.l[0];
|
||||
guint32 time = xevent->xclient.data.l[2];
|
||||
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window));
|
||||
GdkDisplayX11 *display_x11;
|
||||
|
||||
if (!event->any.window ||
|
||||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
|
||||
return GDK_FILTER_CONTINUE; /* Not for us */
|
||||
|
||||
GDK_NOTE (DND,
|
||||
g_message ("XdndDrop: source_window: %#x time: %d",
|
||||
source_window, time));
|
||||
|
||||
display_x11 = GDK_DISPLAY_X11 (GDK_DRAWABLE_DISPLAY (event->any.window));
|
||||
|
||||
if ((display_x11->current_dest_drag != NULL) &&
|
||||
(display_x11->current_dest_drag->protocol == GDK_DRAG_PROTO_XDND) &&
|
||||
(GDK_DRAWABLE_XID (display_x11->current_dest_drag->source_window) == source_window))
|
||||
|
Loading…
Reference in New Issue
Block a user