aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-02-01 22:49:01 +0800
committerChristian Persch <chpe@src.gnome.org>2005-02-01 22:49:01 +0800
commit866c65f75f9f584f86fe91079173b814badbf3d3 (patch)
treef05c430dd449fe64c9998c00566b46cab5baaf74 /src
parent43f229ae4bf329c0b7d4f46cb4d1853fe9ba0635 (diff)
downloadgsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.tar
gsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.tar.gz
gsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.tar.bz2
gsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.tar.lz
gsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.tar.xz
gsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.tar.zst
gsoc2013-epiphany-866c65f75f9f584f86fe91079173b814badbf3d3.zip
Ungrab the pointer when moving tab between notebooks. Fixes bug #165797.
2005-02-01 Christian Persch <chpe@cvs.gnome.org> * src/ephy-notebook.c: (motion_notify_cb), (move_tab_to_another_notebook), (button_release_cb), (ephy_notebook_finalize): Ungrab the pointer when moving tab between notebooks. Fixes bug #165797.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-notebook.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 26415fda5..1fbdd27c4 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -79,6 +79,7 @@ static void ephy_notebook_class_init (EphyNotebookClass *klass);
static void ephy_notebook_finalize (GObject *object);
static void move_tab_to_another_notebook (EphyNotebook *src,
EphyNotebook *dest,
+ GdkEventMotion *event,
int dest_position);
/* Local variables */
@@ -451,7 +452,7 @@ motion_notify_cb (EphyNotebook *notebook,
if (dest != notebook)
{
move_tab_to_another_notebook (notebook, dest,
- page_num);
+ event, page_num);
}
else
{
@@ -466,11 +467,15 @@ motion_notify_cb (EphyNotebook *notebook,
static void
move_tab_to_another_notebook (EphyNotebook *src,
EphyNotebook *dest,
+ GdkEventMotion *event,
int dest_position)
{
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
@@ -483,7 +488,12 @@ move_tab_to_another_notebook (EphyNotebook *src,
tab = EPHY_TAB (gtk_notebook_get_nth_page (GTK_NOTEBOOK (src), cur_page));
/* stop drag in origin window */
+ /* ungrab the pointer if it's grabbed */
drag_stop (src);
+ if (gdk_pointer_is_grabbed ())
+ {
+ gdk_pointer_ungrab (event->time);
+ }
gtk_grab_remove (GTK_WIDGET (src));
ephy_notebook_move_tab (src, dest, tab, dest_position);
@@ -524,12 +534,14 @@ button_release_cb (EphyNotebook *notebook,
/* ungrab the pointer if it's grabbed */
if (gdk_pointer_is_grabbed ())
{
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
+ gdk_pointer_ungrab (event->time);
gtk_grab_remove (GTK_WIDGET (notebook));
}
}
+
/* This must be called even if a drag isn't happening */
drag_stop (notebook);
+
return FALSE;
}