aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-02-20 22:46:55 +0800
committerChristian Persch <chpe@src.gnome.org>2005-02-20 22:46:55 +0800
commit9335c841e72436b5e063428ff26a70bad198cf81 (patch)
tree89114f00315113bfaf857bebc925c64e6687e1b6 /src
parent5fa9306e1cdafc41866219183039b852b112f553 (diff)
downloadgsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.tar
gsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.tar.gz
gsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.tar.bz2
gsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.tar.lz
gsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.tar.xz
gsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.tar.zst
gsoc2013-epiphany-9335c841e72436b5e063428ff26a70bad198cf81.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.c29
1 files changed, 15 insertions, 14 deletions
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 */