aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-02-20 22:59:37 +0800
committerChristian Persch <chpe@src.gnome.org>2005-02-20 22:59:37 +0800
commit129e2582c3f6b366b3fe08804f93ea70157df918 (patch)
tree786515a98520fb9d9a6a4df2f6bceb3adc1022d7 /src
parent710b8e0dbe068a57867152c58dd02434014beaf5 (diff)
downloadgsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.tar
gsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.tar.gz
gsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.tar.bz2
gsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.tar.lz
gsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.tar.xz
gsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.tar.zst
gsoc2013-epiphany-129e2582c3f6b366b3fe08804f93ea70157df918.zip
Use event time when grabbing the pointer. Appears to fix bug #167473.
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.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-notebook.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 1fbdd27c4..de187d2f7 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -362,20 +362,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);
}
}
@@ -435,12 +439,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,
@@ -499,13 +502,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
@@ -535,8 +539,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 */