summaryrefslogtreecommitdiff
path: root/extra/transmission/fix_minimize.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/transmission/fix_minimize.patch')
-rw-r--r--extra/transmission/fix_minimize.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/extra/transmission/fix_minimize.patch b/extra/transmission/fix_minimize.patch
new file mode 100644
index 000000000..fe0f42a03
--- /dev/null
+++ b/extra/transmission/fix_minimize.patch
@@ -0,0 +1,27 @@
+Index: /trunk/gtk/main.c
+===================================================================
+--- /trunk/gtk/main.c (revision 12968)
++++ /trunk/gtk/main.c (revision 13067)
+@@ -73,4 +73,5 @@
+ gboolean is_iconified;
+
++ guint activation_count;
+ guint timer;
+ guint update_model_soon_tag;
+@@ -533,6 +534,14 @@
+
+ static void
+-on_activate( GApplication * app UNUSED, gpointer unused UNUSED )
+-{
++on_activate( GApplication * app UNUSED, struct cbdata * cbdata )
++{
++ cbdata->activation_count++;
++
++ /* GApplication emits an 'activate' signal when bootstrapping the primary.
++ * Ordinarily we handle that by presenting the main window, but if the user
++ * user started Transmission minimized, ignore that initial signal... */
++ if( cbdata->is_iconified && ( cbdata->activation_count == 1 ) )
++ return;
++
+ gtr_action_activate( "present-main-window" );
+ }