/pidgin/main: be84e0a7e68d: GTK Request: don't loose focus when ...
Tomasz Wasilczyk
twasilczyk at pidgin.im
Tue Sep 17 16:16:40 EDT 2013
Changeset: be84e0a7e68dda67d0973aa09d36f00a6310e932
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2013-09-17 22:16 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/be84e0a7e68d
Description:
GTK Request: don't loose focus when switching request dialogs
diffstat:
pidgin/gtkrequest.c | 1 +
pidgin/gtkutils.c | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (40 lines):
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -127,6 +127,7 @@ generic_response_start(PidginRequestData
g_object_set_data(G_OBJECT(data->dialog),
"pidgin-window-is-closing", GINT_TO_POINTER(TRUE));
+ gtk_widget_set_visible(GTK_WIDGET(data->dialog), FALSE);
}
static void
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -2953,6 +2953,13 @@ gboolean pidgin_auto_parent_window(GtkWi
GtkWindow *window = GTK_WINDOW(windows->data);
windows = g_list_delete_link(windows, windows);
+ if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window),
+ "pidgin-window-is-closing")))
+ {
+ parent = gtk_window_get_transient_for(window);
+ break;
+ }
+
if (GTK_WIDGET(window) == widget ||
!gtk_widget_get_visible(GTK_WIDGET(window))) {
continue;
@@ -2966,11 +2973,6 @@ gboolean pidgin_auto_parent_window(GtkWi
}
if (windows)
g_list_free(windows);
- if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(parent),
- "pidgin-window-is-closing")))
- {
- parent = gtk_window_get_transient_for(parent);
- }
if (parent) {
gtk_window_set_transient_for(GTK_WINDOW(widget), parent);
return TRUE;
More information about the Commits
mailing list