From 2be5abf4ed3b244c34feaf4134577f4a066e89bb Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Tue, 31 Mar 1998 03:16:09 +0000 Subject: [PATCH] First fix: Move the window first, display it after (this removes one of 1998-03-30 Miguel de Icaza * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the window first, display it after (this removes one of the annoying flashing effects). --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gdk/gdkdnd.c | 11 ++++++++--- gdk/x11/gdkdnd-x11.c | 11 ++++++++--- 9 files changed, 58 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb739a1414..05f86dd642 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index eb739a1414..05f86dd642 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index eb739a1414..05f86dd642 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index eb739a1414..05f86dd642 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index eb739a1414..05f86dd642 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index eb739a1414..05f86dd642 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index eb739a1414..05f86dd642 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +1998-03-30 Miguel de Icaza + + * gdk/gdkdnd.c (gdk_dnd_display_drag_cursor): First fix: Move the + window first, display it after (this removes one of the annoying + flashing effects). + Mon Mar 30 21:29:43 1998 Owen Taylor * gtk/gtkentry.c: Add a "style_set" callback, so the diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c index be84e6dbfc..064a6d3b47 100644 --- a/gdk/gdkdnd.c +++ b/gdk/gdkdnd.c @@ -82,6 +82,8 @@ void gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, gboolean change_made) { + int more_debug = 0; + if(!gdk_dnd.dnd_grabbed) return; @@ -104,7 +106,7 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, if(x == -1 && y == -1) /* We're supposed to find it out for ourselves */ XQueryPointer(gdk_display, gdk_root_window, &wtmp, &wtmp, &x, &y, &itmp, &itmp, &masktmp); - + if(drag_ok) { mypix = gdk_dnd.c->drag_pm_ok; @@ -120,10 +122,13 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, if(change_made) { gdk_window_hide(opix); - gdk_window_show(mypix); /* There ought to be a way to know if - a window is already mapped etc. */ } gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y); + if (change_made) + { + gdk_window_show(mypix); /* There ought to be a way to know if + a window is already mapped etc. */ + } } else if(change_made) { diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index be84e6dbfc..064a6d3b47 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -82,6 +82,8 @@ void gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, gboolean change_made) { + int more_debug = 0; + if(!gdk_dnd.dnd_grabbed) return; @@ -104,7 +106,7 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, if(x == -1 && y == -1) /* We're supposed to find it out for ourselves */ XQueryPointer(gdk_display, gdk_root_window, &wtmp, &wtmp, &x, &y, &itmp, &itmp, &masktmp); - + if(drag_ok) { mypix = gdk_dnd.c->drag_pm_ok; @@ -120,10 +122,13 @@ gdk_dnd_display_drag_cursor(gint x, gint y, gboolean drag_ok, if(change_made) { gdk_window_hide(opix); - gdk_window_show(mypix); /* There ought to be a way to know if - a window is already mapped etc. */ } gdk_window_move(mypix, x - myhotspot->x, y - myhotspot->y); + if (change_made) + { + gdk_window_show(mypix); /* There ought to be a way to know if + a window is already mapped etc. */ + } } else if(change_made) {