diff options
Diffstat (limited to 'gnome-base/gnome-session/files')
4 files changed, 218 insertions, 0 deletions
diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch new file mode 100644 index 000000000000..c5cfcebbfd8b --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size.patch @@ -0,0 +1,21 @@ +From 8c4cdd5304929d19a27f876eb9cb5bbb67a4d59f Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Mon, 29 Nov 2010 21:44:03 +0000 +Subject: capplet: Give the dialog a reasonable default height + +https://bugzilla.gnome.org/show_bug.cgi?id=635891 +--- +diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c +index 4432b09..8b51169 100644 +--- a/capplet/gsm-properties-dialog.c ++++ b/capplet/gsm-properties-dialog.c +@@ -784,6 +784,7 @@ gsm_properties_dialog_init (GsmPropertiesDialog *dialog) + "main-notebook")); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); + ++ gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 450); + gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); + gtk_box_set_spacing (GTK_BOX (content_area), 2); +-- +cgit v0.9.0.2 diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch new file mode 100644 index 000000000000..39a02806d599 --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-dialog-size2.patch @@ -0,0 +1,25 @@ +From 6fd301895a39fc32f302ea3fced74fc03e5c75c9 Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Mon, 29 Nov 2010 21:47:00 +0000 +Subject: capplet: Also give the dialog a reasonable width + +We don't want to depend on the natural size, which depends on the length +of strings for this. + +https://bugzilla.gnome.org/show_bug.cgi?id=635891 +--- +diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c +index 8b51169..487250e 100644 +--- a/capplet/gsm-properties-dialog.c ++++ b/capplet/gsm-properties-dialog.c +@@ -784,7 +784,7 @@ gsm_properties_dialog_init (GsmPropertiesDialog *dialog) + "main-notebook")); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); + +- gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 450); ++ gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450); + gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); + gtk_box_set_spacing (GTK_BOX (content_area), 2); +-- +cgit v0.9.0.2 diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch new file mode 100644 index 000000000000..9c272375e3eb --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-gsettings-conditions.patch @@ -0,0 +1,135 @@ +--- gnome-session/gsm-autostart-app.c.old 2011-09-12 11:06:20.552420744 +0200 ++++ gnome-session/gsm-autostart-app.c 2011-09-12 11:18:39.934966203 +0200 +@@ -66,6 +66,7 @@ + + GFileMonitor *condition_monitor; + guint condition_notify_id; ++ GSettings *condition_settings; + + int launch_type; + GPid pid; +@@ -164,6 +165,8 @@ + kind = GSM_CONDITION_UNLESS_EXISTS; + } else if (!g_ascii_strncasecmp (condition_string, "GNOME", len)) { + kind = GSM_CONDITION_GNOME; ++ } else if (!g_ascii_strncasecmp (condition_string, "GSettings", len)) { ++ kind = GSM_CONDITION_GSETTINGS; + } else if (!g_ascii_strncasecmp (condition_string, "GNOME3", len)) { + condition_string = key; + space = condition_string + strcspn (condition_string, " "); +@@ -289,6 +292,81 @@ + } + + static void ++gsettings_condition_cb (GSettings *settings, ++ const char *key, ++ gpointer user_data) ++{ ++ GsmApp *app; ++ GsmAutostartAppPrivate *priv; ++ gboolean condition; ++ ++ g_return_if_fail (GSM_IS_APP (user_data)); ++ ++ app = GSM_APP (user_data); ++ ++ priv = GSM_AUTOSTART_APP (app)->priv; ++ ++ condition = g_settings_get_boolean (settings, key); ++ ++ g_debug ("GsmAutostartApp: app:%s condition changed condition:%d", ++ gsm_app_peek_id (app), ++ condition); ++ ++ /* Emit only if the condition actually changed */ ++ if (condition != priv->condition) { ++ priv->condition = condition; ++ g_signal_emit (app, signals[CONDITION_CHANGED], 0, condition); ++ } ++} ++ ++static gboolean ++setup_gsettings_condition_monitor (GsmAutostartApp *app, ++ const char *key) ++{ ++ GSettings *settings; ++ const char * const *schemas; ++ char **elems; ++ gboolean schema_exists; ++ guint i; ++ gboolean retval; ++ char *signal; ++ ++ elems = g_strsplit (key, " ", 2); ++ if (elems == NULL) ++ return FALSE; ++ if (elems[0] == NULL || elems[1] == NULL) { ++ g_strfreev (elems); ++ return FALSE; ++ } ++ ++ schemas = g_settings_list_schemas (); ++ schema_exists = FALSE; ++ for (i = 0; schemas[i] != NULL; i++) { ++ if (g_str_equal (schemas[i], elems[0])) { ++ schema_exists = TRUE; ++ break; ++ } ++ } ++ ++ if (schema_exists == FALSE) ++ return FALSE; ++ ++ settings = g_settings_new (elems[0]); ++ retval = g_settings_get_boolean (settings, elems[1]); ++ ++ signal = g_strdup_printf ("changed::%s", elems[1]); ++ g_signal_connect (G_OBJECT (settings), signal, ++ G_CALLBACK (gsettings_condition_cb), app); ++ g_free (signal); ++ ++ app->priv->condition_settings = settings; ++ ++ g_strfreev (elems); ++ ++ return retval; ++} ++ ++static void + setup_condition_monitor (GsmAutostartApp *app) + { + guint kind; +@@ -383,6 +461,8 @@ + gconf_condition_cb, + app, NULL, NULL); + g_object_unref (client); ++ } else if (kind == GSM_CONDITION_GSETTINGS) { ++ disabled = !setup_gsettings_condition_monitor (app, key); + } else if (kind == GSM_CONDITION_IF_SESSION) { + /* We treat GNOME 2.32 as the same as gnome-fallback */ + disabled = strcmp ("gnome-fallback", key) != 0; +@@ -578,6 +658,11 @@ + priv->condition_string = NULL; + } + ++ if (priv->condition_settings) { ++ g_object_unref (priv->condition_settings); ++ priv->condition_settings = NULL; ++ } ++ + if (priv->desktop_file) { + egg_desktop_file_free (priv->desktop_file); + priv->desktop_file = NULL; +@@ -672,6 +757,12 @@ + g_assert (GCONF_IS_CLIENT (client)); + disabled = !gconf_client_get_bool (client, key, NULL); + g_object_unref (client); ++ } else if (kind == GSM_CONDITION_GSETTINGS && ++ priv->condition_settings != NULL) { ++ char **elems; ++ elems = g_strsplit (key, " ", 2); ++ disabled = !g_settings_get_boolean (priv->condition_settings, elems[1]); ++ g_strfreev (elems); + } else if (kind == GSM_CONDITION_IF_SESSION) { + /* We treat GNOME 2.32 as the same as gnome-fallback */ + disabled = strcmp ("gnome-fallback", key) != 0; diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch new file mode 100644 index 000000000000..4fb215151d12 --- /dev/null +++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-idle-transition.patch @@ -0,0 +1,37 @@ +From 861313503a741f0129611ca005cf6d7c27124b54 Mon Sep 17 00:00:00 2001 +From: Christopher Halse Rogers <chalserogers@gmail.com> +Date: Thu, 26 May 2011 09:09:14 +0000 +Subject: gsm: Fix race condition in idle monitor + +In _xsync_alarm_set(), the positive and negative transition intervals +are set to the same value. However, the SYNC extension defines the +positive transition as set when the counter goes from strictly below the +threshold to greater than or equal to the threshold and similarly a +negative transition is triggered when the counter goes form strictly +greater than the threshold to less than or equal to the threshold. + +Thus in the current set up there's a chance that the positive transition +can trigger, marking the session as idle, and some user input occur on +the same click so the IDLETIME count will hit the threshold but not go +above so the negative transition will not trigger. Thus the session will +not be marked as active. + +The negative transition threshold should be set to 1ms less than the +positive transition to ensure that it always fires. + +https://bugzilla.gnome.org/show_bug.cgi?id=627903 +--- +diff --git a/gnome-session/gs-idle-monitor.c b/gnome-session/gs-idle-monitor.c +index cd38dcb..d25144f 100644 +--- a/gnome-session/gs-idle-monitor.c ++++ b/gnome-session/gs-idle-monitor.c +@@ -463,6 +463,7 @@ _xsync_alarm_set (GSIdleMonitor *monitor, + watch->xalarm_positive = XSyncCreateAlarm (monitor->priv->display, flags, &attr); + } + ++ attr.trigger.wait_value = _int64_to_xsyncvalue (_xsyncvalue_to_int64 (watch->interval) - 1); + attr.trigger.test_type = XSyncNegativeTransition; + if (watch->xalarm_negative != None) { + g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld", +-- +cgit v0.9.0.2 |