src/gtkconv.c

changeset 4803
58f51119f6b5
parent 4793
1da93f6c80f3
child 4812
c8681510fec4
--- a/src/gtkconv.c	Sun Mar 16 22:34:43 2003 +0000
+++ b/src/gtkconv.c	Mon Mar 17 01:57:37 2003 +0000
@@ -316,9 +316,9 @@
 	struct gaim_conversation *conv;
 	struct gaim_gtk_conversation *gtkconv;
 
-	conv    = gaim_window_get_active_conversation(win);
-
-	if(!conv)
+	conv = gaim_window_get_active_conversation(win);
+
+	if (!conv)
 		return;
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
@@ -1313,9 +1313,11 @@
 
 	/* Grab the pointer */
 	gtk_grab_add(gtkwin->notebook);
-	gdk_pointer_grab(gtkwin->notebook->window, FALSE,
-					 GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
-					 NULL, cursor, GDK_CURRENT_TIME);
+
+	if (!gdk_pointer_is_grabbed())
+		gdk_pointer_grab(gtkwin->notebook->window, FALSE,
+						 GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
+						 NULL, cursor, GDK_CURRENT_TIME);
 }
 
 static gboolean
@@ -1495,8 +1497,8 @@
 
 	if (gtkwin->in_drag) {
 		debug_printf("Already in the middle of a window "
-				"drag at tab_press_cb\n");
-		return FALSE;
+					 "drag at tab_press_cb\n");
+		return TRUE;
 	}
 
 	/* 
@@ -1590,9 +1592,8 @@
 
 	gtkwin = GAIM_GTK_WINDOW(win);
 
-	if (!gtkwin->in_predrag && !gtkwin->in_drag) {
-		return TRUE;
-	}
+	if (!gtkwin->in_predrag && !gtkwin->in_drag)
+		return FALSE;
 
 	/* Disconnect the motion signal. */
 	if (gtkwin->drag_motion_signal) {
@@ -1619,9 +1620,8 @@
 
 	/* If we're not in drag...        */
 	/* We're perfectly normal people! */
-	if (!gtkwin->in_drag) {
+	if (!gtkwin->in_drag)
 		return FALSE;
-	}
 
 	gtkwin->in_drag = FALSE;
 

mercurial