aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/ephy-notebook.c29
2 files changed, 22 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a62cfe6b..2cc3f4139 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-02-20 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-notebook.c: (drag_start), (motion_notify_cb),
+ (move_tab_to_another_notebook), (button_release_cb):
+
+ Use event time when grabbing the pointer. Appears to fix bug #167473.
+
2005-02-18 Xan Lopez <xan@gnome.org>
* src/ephy-session.c: (impl_attach_window), (write_ephy_window),
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 58667b9bf..807e374ba 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -354,20 +354,24 @@ ephy_notebook_move_tab (EphyNotebook *src,
}
static void
-drag_start (EphyNotebook *notebook)
+drag_start (EphyNotebook *notebook,
+ guint32 time)
{
notebook->priv->drag_in_progress = TRUE;
/* get a new cursor, if necessary */
+ /* FIXME multi-head */
if (!cursor) cursor = gdk_cursor_new (GDK_FLEUR);
/* grab the pointer */
gtk_grab_add (GTK_WIDGET (notebook));
- if (!gdk_pointer_is_grabbed ()) {
- gdk_pointer_grab (GDK_WINDOW(GTK_WIDGET (notebook)->window),
+ /* FIXME multi-head */
+ if (!gdk_pointer_is_grabbed ())
+ {
+ gdk_pointer_grab (GTK_WIDGET (notebook)->window,
FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- NULL, cursor, GDK_CURRENT_TIME);
+ NULL, cursor, time);
}
}
@@ -427,12 +431,11 @@ motion_notify_cb (EphyNotebook *notebook,
notebook->priv->y_start,
event->x_root, event->y_root))
{
- drag_start (notebook);
- }
- else
- {
- return FALSE;
+ drag_start (notebook, event->time);
+ return TRUE;
}
+
+ return FALSE;
}
result = find_notebook_and_tab_at_pos ((gint)event->x_root,
@@ -465,9 +468,6 @@ move_tab_to_another_notebook (EphyNotebook *src,
EphyTab *tab;
int cur_page;
- LOG ("moving tab from notebook %p to notebook %p at %d",
- src, dest, dest_position);
-
/* This is getting tricky, the tab was dragged in a notebook
* in another window of the same app, we move the tab
* to that new notebook, and let this notebook handle the
@@ -491,13 +491,14 @@ move_tab_to_another_notebook (EphyNotebook *src,
ephy_notebook_move_tab (src, dest, tab, dest_position);
/* start drag handling in dest notebook */
- drag_start (dest);
dest->priv->motion_notify_handler_id =
g_signal_connect (G_OBJECT (dest),
"motion-notify-event",
G_CALLBACK (motion_notify_cb),
NULL);
+
+ drag_start (dest, event->time);
}
static gboolean
@@ -527,8 +528,8 @@ button_release_cb (EphyNotebook *notebook,
if (gdk_pointer_is_grabbed ())
{
gdk_pointer_ungrab (event->time);
- gtk_grab_remove (GTK_WIDGET (notebook));
}
+ gtk_grab_remove (GTK_WIDGET (notebook));
}
/* This must be called even if a drag isn't happening */