im.pidgin.pidgin: 7793ae5b4dd75b3c2f62c2502dbd08c76dbe7b1c

datallah at pidgin.im datallah at pidgin.im
Tue Oct 23 23:35:34 EDT 2007


-----------------------------------------------------------------
Revision: 7793ae5b4dd75b3c2f62c2502dbd08c76dbe7b1c
Ancestor: 267f2e22b77cc35309c41a034169f74faaa46e1f
Author: datallah at pidgin.im
Date: 2007-10-24T03:29:33
Branch: im.pidgin.pidgin

Modified files:
        pidgin/gtkconv.c

ChangeLog: 

Use gtk_window_set_focus_on_map() to prevent focus on new conversation windows (hopefully only) when the new window was prompted by an external event.  This seems to work pretty well, but I suppose those with higher expectations of their WM will be sure to tell me if this messes something up. References #3618.

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	7b476175469c1a5fd67cb516d841ef5e96435fef
+++ pidgin/gtkconv.c	61315be4a2d497c0d68138143ed1977f349ff0b7
@@ -8828,6 +8828,9 @@ pidgin_conv_window_new()
 	GtkPositionType pos;
 	GtkWidget *testidea;
 	GtkWidget *menubar;
+#if GTK_CHECK_VERSION(2,6,0)
+	GdkModifierType state;
+#endif
 
 	win = g_malloc0(sizeof(PidginWindow));
 
@@ -8835,6 +8838,10 @@ pidgin_conv_window_new()
 
 	/* Create the window. */
 	win->window = pidgin_create_window(NULL, 0, "conversation", TRUE);
+#if GTK_CHECK_VERSION(2,6,0)
+	if (!gtk_get_current_event_state(&state))
+		gtk_window_set_focus_on_map(GTK_WINDOW(win->window), FALSE);
+#endif
 	pidgin_conv_restore_position(win);
 
 	if (available_list == NULL) {
@@ -8907,7 +8914,8 @@ pidgin_conv_window_new()
 	g_signal_connect(G_OBJECT(win->window), "show",
 	                 G_CALLBACK(winpidgin_ensure_onscreen), win->window);
 
-	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs"))
+	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs")
+			&& !gtk_get_current_event_state(&state))
 		gtk_window_iconify(GTK_WINDOW(win->window));
 #endif
 


More information about the Commits mailing list