Compare commits

...

16 Commits
master ... f9

Author SHA1 Message Date
Fedora Release Engineering
f7e16fa2a6 dist-git conversion 2010-07-28 16:31:37 +00:00
Bill Nottingham
0543b10847 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 02:01:00 +00:00
Ray Strode
28a535b82f - Shutdown cleanly when bus goes away (bug 445898 again) 2008-12-10 20:04:49 +00:00
Ray Strode
b4435bc5ca one more crack at fixing build 2008-12-09 22:14:23 +00:00
Ray Strode
45e918bd3d Fix build 2008-12-09 21:55:50 +00:00
Ray Strode
f9f7046647 - Shutdown cleanly on exit (bug 445898) 2008-12-09 21:16:28 +00:00
Colin Walters
ee79fbe4d6 - Add (now upstreamed) patch to legacy ESD preference; see
http://bugzilla.gnome.org/show_bug.cgi?id=533198
    https://bugzilla.redhat.com/show_bug.cgi?id=430624
2008-06-17 19:05:42 +00:00
Matthias Clasen
011ff32289 drop unintended patch 2008-05-29 01:50:27 +00:00
Matthias Clasen
7f27dffeba 2.22.2.1 2008-05-29 01:45:34 +00:00
Matthias Clasen
72c4980d7a fix background drawing without nautilus 2008-05-05 05:18:26 +00:00
Bastien Nocera
2c8032850f Fix patch application 2008-04-29 13:54:21 +00:00
Bastien Nocera
0d2a3866dd Update patch to apply to the 2.22 branch 2008-04-29 13:40:52 +00:00
Bastien Nocera
bd0a7fc3bb - Add patch from upstream to avoid the Stop button triggering an Eject
(#346201)
2008-04-29 09:51:27 +00:00
Soren Sandmann Pedersen
c59c4dc489 Integrate fixes from other distributions 2008-04-25 05:04:38 +00:00
Matthias Clasen
b03019b0fa Make xrandr plugin survive if xrandr is missing 2008-04-22 17:48:15 +00:00
Jesse Keating
396a1369be Initialize branch F-9 for gnome-settings-daemon 2008-04-20 20:20:18 +00:00
11 changed files with 504 additions and 94 deletions

View File

@ -1 +0,0 @@
gnome-settings-daemon-2.22.1.tar.bz2

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
gnome-settings-daemon-2.22.2.1.tar.bz2

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: gnome-settings-daemon
# $Id$
NAME := gnome-settings-daemon
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,7 +1,8 @@
diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-randr-12 gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c
--- gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-randr-12 2008-03-24 17:21:50.000000000 -0400
+++ gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c 2008-04-05 12:42:41.000000000 -0400
@@ -35,15 +35,33 @@
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 620d783..ad5a914 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -35,7 +35,10 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
@ -13,9 +14,8 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
#ifdef HAVE_RANDR
#include <X11/extensions/Xrandr.h>
#endif
-#include "gnome-settings-profile.h"
@@ -44,6 +47,22 @@
#include "gnome-settings-profile.h"
#include "gsd-xrandr-manager.h"
+#define GSD_XRANDR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManagerPrivate))
@ -37,7 +37,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
static void gsd_xrandr_manager_class_init (GsdXrandrManagerClass *klass);
static void gsd_xrandr_manager_init (GsdXrandrManager *xrandr_manager);
static void gsd_xrandr_manager_finalize (GObject *object);
@@ -52,252 +70,74 @@ G_DEFINE_TYPE (GsdXrandrManager, gsd_xra
@@ -52,262 +71,113 @@ G_DEFINE_TYPE (GsdXrandrManager, gsd_xrandr_manager, G_TYPE_OBJECT)
static gpointer manager_object = NULL;
@ -46,7 +46,9 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
-get_rotation (GConfClient *client,
- char *display,
- int screen)
-{
+static GdkAtom
+gnome_randr_atom (void)
{
- char *key;
- int val;
- GError *error;
@ -63,9 +65,6 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
- g_error_free (error);
-
- return 0;
+static GdkAtom
+gnome_randr_atom (void)
+{
+ return gdk_atom_intern ("_GNOME_RANDR_ATOM", FALSE);
}
@ -75,7 +74,9 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
- char *keys[],
- int *width,
- int *height)
-{
+static Atom
+gnome_randr_xatom (void)
{
- int i;
- char *key;
- char *val;
@ -96,20 +97,41 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
- if (val == NULL) {
- return -1;
- }
+static Atom
+gnome_randr_xatom (void)
+{
+ return gdk_x11_atom_to_xatom (gnome_randr_atom());
+}
-
- if (sscanf (val, "%dx%d", &w, &h) != 2) {
- g_free (val);
- return -1;
- }
-
- g_free (val);
-
- *width = w;
- *height = h;
-
- return i;
+ return gdk_x11_atom_to_xatom (gnome_randr_atom());
}
-static int
-get_rate (GConfClient *client,
- char *display,
- int screen)
+static GdkFilterReturn
+on_client_message (GdkXEvent *xevent,
+ GdkEvent *event,
+ gpointer data)
+{
{
- char *key;
- int val;
- GError *error;
-
- key = g_strdup_printf ("%s/%d/rate", display, screen);
- error = NULL;
- val = gconf_client_get_int (client, key, &error);
- g_free (key);
-
- if (error == NULL) {
- return val;
+ RWScreen *screen = data;
+ XEvent *ev = (XEvent *)xevent;
+
@ -121,57 +143,24 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
+ return GDK_FILTER_REMOVE;
}
-
- g_free (val);
- g_error_free (error);
-
- *width = w;
- *height = h;
-
- return i;
- return 0;
+
+ /* Pass the event on to GTK+ */
+ return GDK_FILTER_CONTINUE;
}
-static int
-get_rate (GConfClient *client,
- char *display,
- int screen)
-find_closest_size (XRRScreenSize *sizes,
- int nsizes,
- int width,
- int height)
+static GdkFilterReturn
+event_filter (GdkXEvent *xevent,
+ GdkEvent *event,
+ gpointer data)
{
- char *key;
- int val;
- GError *error;
+ GsdXrandrManager *manager = data;
+ XEvent *xev = (XEvent *) xevent;
- key = g_strdup_printf ("%s/%d/rate", display, screen);
- error = NULL;
- val = gconf_client_get_int (client, key, &error);
- g_free (key);
+ if (!manager->priv->running)
+ return GDK_FILTER_CONTINUE;
- if (error == NULL) {
- return val;
- }
-
- g_error_free (error);
+ /* verify we have a key event */
+ if (xev->xany.type != KeyPress && xev->xany.type != KeyRelease)
+ return GDK_FILTER_CONTINUE;
- return 0;
-}
-
-static int
-find_closest_size (XRRScreenSize *sizes,
- int nsizes,
- int width,
- int height)
-{
- int closest;
- int closest_width;
- int closest_height;
@ -188,6 +177,16 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
- closest_width = sizes[i].width;
- closest_height = sizes[i].height;
- }
+ GsdXrandrManager *manager = data;
+ XEvent *xev = (XEvent *) xevent;
+
+ if (!manager->priv->running)
+ return GDK_FILTER_CONTINUE;
+
+ /* verify we have a key event */
+ if (xev->xany.type != KeyPress && xev->xany.type != KeyRelease)
+ return GDK_FILTER_CONTINUE;
+
+ if (xev->xkey.keycode == manager->priv->keycode) {
+ /* FIXME: here we should cycle between valid
+ * configurations, and save them
@ -316,13 +315,13 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
- XRRFreeScreenConfigInfo (config);
- }
- }
+ GsdXrandrManager *manager = data;
-
- g_free (specific_path);
-
- /* We need to make sure we process the screen resize event. */
- gdk_display_sync (display);
-
+ GsdXrandrManager *manager = data;
- while (gtk_events_pending ()) {
- gtk_main_iteration ();
- }
@ -341,12 +340,20 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
}
gboolean
@@ -306,8 +146,30 @@ gsd_xrandr_manager_start (GsdXrandrManag
gsd_xrandr_manager_start (GsdXrandrManager *manager,
GError **error)
{
g_debug ("Starting xrandr manager");
- g_debug ("Starting xrandr manager");
- apply_settings (manager);
-
+
+ g_debug ("Starting xrandr manager");
+ if (manager->priv->rw_screen == NULL) {
+ g_set_error (error, 0, 0, "Failed to initialize XRandR extension");
+ return FALSE;
+ }
+
+ manager->priv->running = TRUE;
+
+ if (manager->priv->keycode) {
@ -374,7 +381,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
return TRUE;
}
@@ -315,6 +177,16 @@ void
@@ -315,6 +185,16 @@ void
gsd_xrandr_manager_stop (GsdXrandrManager *manager)
{
g_debug ("Stopping xrandr manager");
@ -391,7 +398,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
}
static void
@@ -388,11 +260,22 @@ gsd_xrandr_manager_class_init (GsdXrandr
@@ -388,11 +268,22 @@ gsd_xrandr_manager_class_init (GsdXrandrManagerClass *klass)
object_class->constructor = gsd_xrandr_manager_constructor;
object_class->dispose = gsd_xrandr_manager_dispose;
object_class->finalize = gsd_xrandr_manager_finalize;
@ -414,7 +421,7 @@ diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.add-ra
}
static void
@@ -405,6 +288,8 @@ gsd_xrandr_manager_finalize (GObject *ob
@@ -405,6 +296,8 @@ gsd_xrandr_manager_finalize (GObject *object)
xrandr_manager = GSD_XRANDR_MANAGER (object);

View File

@ -0,0 +1,203 @@
============================================================
Listen for SIGTERM and shut down properly
diff -up gnome-settings-daemon-2.22.2.1/gnome-settings-daemon/main.c.shutdown-cleanly gnome-settings-daemon-2.22.2.1/gnome-settings-daemon/main.c
--- gnome-settings-daemon-2.22.2.1/gnome-settings-daemon/main.c.shutdown-cleanly 1974-03-20 21:48:41.000000000 -0400
+++ gnome-settings-daemon-2.22.2.1/gnome-settings-daemon/main.c 2008-12-09 16:10:14.000000000 -0500
@@ -24,6 +24,9 @@
#include <libintl.h>
#include <errno.h>
#include <locale.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <unistd.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -41,6 +41,7 @@
static char *gconf_prefix = NULL;
static gboolean no_daemon = TRUE;
static gboolean debug = FALSE;
+static int term_signal_pipe_fds[2];
static GOptionEntry entries[] = {
{"debug", 0, 0, G_OPTION_ARG_NONE, &debug, "Enable debugging code", NULL },
@@ -189,6 +190,55 @@ gsd_log_default_handler (const gchar *
unused_data);
}
+static void
+on_term_signal (int signal)
+{
+ /* Wake up main loop to tell it to shutdown */
+ close (term_signal_pipe_fds[1]);
+ term_signal_pipe_fds[1] = -1;
+}
+
+static gboolean
+on_term_signal_pipe_closed (GIOChannel *source,
+ GIOCondition condition,
+ gpointer data)
+{
+ GnomeSettingsManager *manager;
+
+ manager = GNOME_SETTINGS_MANAGER (data);
+
+ term_signal_pipe_fds[0] = -1;
+
+ /* Got SIGTERM, time to clean up and get out
+ */
+ gtk_main_quit ();
+
+ return FALSE;
+}
+
+static void
+watch_for_term_signal (GnomeSettingsManager *manager)
+{
+ GIOChannel *channel;
+
+ if (-1 == pipe (term_signal_pipe_fds) ||
+ -1 == fcntl (term_signal_pipe_fds[0], F_SETFD, FD_CLOEXEC) ||
+ -1 == fcntl (term_signal_pipe_fds[1], F_SETFD, FD_CLOEXEC)) {
+ g_error ("Could not create pipe: %s", g_strerror (errno));
+ exit (EXIT_FAILURE);
+ }
+
+ channel = g_io_channel_unix_new (term_signal_pipe_fds[0]);
+ g_io_channel_set_encoding (channel, NULL, NULL);
+ g_io_channel_set_buffered (channel, FALSE);
+ g_io_add_watch (channel, G_IO_HUP, on_term_signal_pipe_closed, manager);
+ g_io_channel_unref (channel);
+
+ signal (SIGTERM, on_term_signal);
+
+}
+
+
int
main (int argc, char *argv[])
{
@@ -266,6 +316,8 @@ main (int argc, char *argv[])
}
}
+ watch_for_term_signal (manager);
+
gtk_main ();
g_free (gconf_prefix);
============================================================
Restore AccessX bits to original values on exit
diff -up gnome-settings-daemon-2.22.2.1/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c.shutdown-cleanly gnome-settings-daemon-2.22.2.1/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
--- gnome-settings-daemon-2.22.2.1/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c.shutdown-cleanly 1974-03-20 21:48:40.000000000 -0400
+++ gnome-settings-daemon-2.22.2.1/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c 2008-12-09 16:14:52.000000000 -0500
@@ -57,6 +57,7 @@ struct GsdA11yKeyboardManagerPrivate
gboolean slowkeys_shortcut_val;
GtkWidget *stickykeys_alert;
GtkWidget *slowkeys_alert;
+ XkbDescRec *original_xkb_desc;
};
#define GSD_KBD_A11Y_ERROR gsd_kbd_a11y_error_quark ()
@@ -742,6 +743,10 @@ gsd_a11y_keyboard_manager_start (GsdA11y
CONFIG_ROOT,
(GConfClientNotifyFunc)keyboard_callback);
+ /* Save current xkb state so we can restore it on exit
+ */
+ manager->priv->original_xkb_desc = get_xkb_desc_rec (manager);
+
event_mask = XkbControlsNotifyMask;
#ifdef DEBUG_ACCESSIBILITY
event_mask |= XkbAccessXNotifyMask; /* make default when AXN_AXKWarning works */
@@ -777,10 +782,39 @@ gsd_a11y_keyboard_manager_start (GsdA11y
return ret;
}
+static void
+restore_server_xkb_config (GsdA11yKeyboardManager *manager)
+{
+ gdk_error_trap_push ();
+ XkbSetControls (GDK_DISPLAY (),
+ XkbSlowKeysMask |
+ XkbBounceKeysMask |
+ XkbStickyKeysMask |
+ XkbMouseKeysMask |
+ XkbMouseKeysAccelMask |
+ XkbAccessXKeysMask |
+ XkbAccessXTimeoutMask |
+ XkbAccessXFeedbackMask |
+ XkbControlsEnabledMask,
+ manager->priv->original_xkb_desc);
+
+ XkbFreeKeyboard (manager->priv->original_xkb_desc,
+ XkbAllComponentsMask, True);
+
+ XSync (GDK_DISPLAY (), FALSE);
+ gdk_error_trap_pop ();
+
+ manager->priv->original_xkb_desc = NULL;
+}
+
void
gsd_a11y_keyboard_manager_stop (GsdA11yKeyboardManager *manager)
{
g_debug ("Stopping a11y_keyboard manager");
+
+ /* Disable all the AccessX bits
+ */
+ restore_server_xkb_config (manager);
}
static void
============================================================
Shutdown properly when bus goes away
Previously we were just letting libdbus
call exit(1) for us which bypasses the
clean up paths.
diff --git a/gnome-settings-daemon/main.c b/gnome-settings-daemon/main.c
--- a/gnome-settings-daemon/main.c
+++ b/gnome-settings-daemon/main.c
@@ -114,6 +114,21 @@ acquire_name_on_proxy (DBusGProxy *bus_proxy)
return ret;
}
+static DBusHandlerResult
+bus_message_handler (DBusConnection *connection,
+ DBusMessage *message,
+ void *user_data)
+{
+ if (dbus_message_is_signal (message,
+ DBUS_INTERFACE_LOCAL,
+ "Disconnected")) {
+ gtk_main_quit ();
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
static DBusGConnection *
get_session_bus (void)
{
@@ -131,7 +146,12 @@ get_session_bus (void)
}
connection = dbus_g_connection_get_connection (bus);
- dbus_connection_set_exit_on_disconnect (connection, TRUE);
+ dbus_connection_add_filter (connection,
+ (DBusHandleMessageFunction)
+ bus_message_handler,
+ NULL, NULL);
+
+ dbus_connection_set_exit_on_disconnect (connection, FALSE);
out:
return bus;

View File

@ -0,0 +1,21 @@
diff -up gnome-settings-daemon-2.22.1/plugins/background/gsd-background-manager.c.no-nautilus gnome-settings-daemon-2.22.1/plugins/background/gsd-background-manager.c
--- gnome-settings-daemon-2.22.1/plugins/background/gsd-background-manager.c.no-nautilus 2008-03-24 17:42:47.000000000 -0400
+++ gnome-settings-daemon-2.22.1/plugins/background/gsd-background-manager.c 2008-05-05 01:08:37.000000000 -0400
@@ -292,6 +294,7 @@ gsd_background_manager_start (GsdBackgro
bg_preferences_load (manager->priv->prefs);
client = gconf_client_get_default ();
+ gconf_client_add_dir (client, "/desktop/gnome/background", GCONF_CLIENT_PRELOAD_NONE, NULL);
gconf_client_notify_add (client,
"/desktop/gnome/background",
(GConfClientNotifyFunc) background_callback,
@@ -314,6 +317,9 @@ gsd_background_manager_start (GsdBackgro
if (!nautilus_show_desktop) {
apply_prefs (manager);
}
+ else {
+ g_timeout_add_seconds (5, apply_prefs, manager);
+ }
gnome_settings_profile_end (NULL);

View File

@ -0,0 +1,51 @@
Index: plugins/sound/gsd-sound-manager.c
===================================================================
--- plugins/sound/gsd-sound-manager.c (revision 340)
+++ plugins/sound/gsd-sound-manager.c (working copy)
@@ -296,7 +296,18 @@
client = gconf_client_get_default ();
+ /* The "preference" here was just around because ESD introduced tradeoffs and was generally
+ poor software. Pulseaudio is better and notably releases the sound device when not in
+ use, so should have no impact for legacy applications. The reason we don't actually want
+ to even read from the preference is because someone may have set it to false intending
+ to disable ESD, but they will then disable Pulseaudio later.
+ https://bugzilla.redhat.com/show_bug.cgi?id=430624
+ */
+#ifdef ENABLE_LEGACY_SOUND_PREF
enable_sound = gconf_client_get_bool (client, "/desktop/gnome/sound/enable_esd", NULL);
+#else
+ enable_sound = TRUE;
+#endif
event_sounds = gconf_client_get_bool (client, "/desktop/gnome/sound/event_sounds", NULL);
/* FIXME this is completely bogus, the entry doesn't exist */
event_changed_new = gconf_client_get_int (client, "/desktop/gnome/sound/event_changed", NULL);
Index: configure.ac
===================================================================
--- configure.ac (revision 340)
+++ configure.ac (working copy)
@@ -317,6 +317,23 @@
# ---------------------------------------------------------------------------
+# Enable Legacy Sound Preference
+# ---------------------------------------------------------------------------
+PKG_CHECK_MODULES(PULSEAUDIO, libpulse, have_pulseaudio=yes, AC_MSG_RESULT([no]))
+if test x$have_pulseaudio = xyes; then
+ default_enable_legacy_sound_pref=no
+else
+ default_enable_legacy_sound_pref=yes
+fi
+AC_ARG_ENABLE(legacy-sound-pref,
+ [AC_HELP_STRING([--enable-legacy-sound-pref],
+ [check for preference to start ESD])],
+ ,enable_legacy_sound_pref=$default_enable_legacy_sound_pref)
+if test "x$enable_legacy_sound_pref" = "xyes"; then
+ AC_DEFINE(ENABLE_LEGACY_SOUND_PREF,1,[enable preference for ESD startup])
+fi
+
+# ---------------------------------------------------------------------------
# Enable Profiling
# ---------------------------------------------------------------------------
AC_ARG_ENABLE(profiling,

View File

@ -1,6 +1,6 @@
Name: gnome-settings-daemon
Version: 2.22.1
Release: 0.2008.03.26.5%{?dist}
Version: 2.22.2.1
Release: 4%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons
@ -23,6 +23,7 @@ BuildRequires: libgnomeui-devel
BuildRequires: libgnome-devel
BuildRequires: xorg-x11-proto-devel
BuildRequires: gstreamer-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: gstreamer-plugins-base-devel
BuildRequires: libgnomekbd-devel
BuildRequires: gettext
@ -34,6 +35,12 @@ Patch2: gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=524499
Patch3: gsd-mouse-too-much-grab.patch
Patch4: gnome-settings-daemon-2.22.1-hide-white-screen.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=530356
# https://bugzilla.redhat.com/show_bug.cgi?id=346201
Patch5: gsd-handle-different-keysyms.patch
Patch6: gnome-settings-daemon-legacy-sound.patch
# http://bugzilla.redhat.com/445898
Patch7: gnome-settings-daemon-2.22.2.1-shutdown-cleanly.patch
%description
A daemon to share settings from GNOME to other applications. It also
@ -59,10 +66,13 @@ pushd plugins/mouse/
%patch3 -p0 -b .no-eat-keys
popd
%patch4 -p1 -b .hide-white-screen
%patch5 -p0 -b .multi-keysyms
%patch6 -p0 -b .legacy-sound
%patch7 -p1 -b .shutdown-cleanly
%build
%configure --enable-static=no --enable-profiling
make %{?_smp_mflags}
make CFLAGS="-O0 -g" #%{?_smp_mflags}
cd po
# clean up .po files
@ -140,6 +150,33 @@ fi
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog
* Wed Dec 10 2008 Ray Strode <rstrode@redhat.com> - 2.22.2.1-4
- Shutdown cleanly when bus goes away (bug 445898 again)
* Tue Dec 9 2008 Ray Strode <rstrode@redhat.com> - 2.22.2.1-3
- Shutdown cleanly on exit (bug 445898)
* Tue Jun 17 2008 Colin Walters <walters@redhat.com> - 2.22.2.1-2
- Add (now upstreamed) patch to legacy ESD preference; see
http://bugzilla.gnome.org/show_bug.cgi?id=533198
https://bugzilla.redhat.com/show_bug.cgi?id=430624
* Wed May 28 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.2.1-1
- Update to 2.22.2.1
* Mon May 5 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.1-1.2008.03.26.8
- Fix background drawing without nautilus
* Tue Apr 29 2008 - Bastien Nocera <bnocera@redhat.com> - 2.22.1-1.2008.03.26.7
- Add patch from upstream to avoid the Stop button triggering an Eject (#346201)
* Fri Apr 25 2008 Soren Sandmann <sandmann@redhat.com> - 2.22.1-2008.03.26.7
- Integrate various fixes from other distributions. Remove xrandr-missingok
patch.
* Tue Apr 22 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.1-2008.03.26.6
- Make the xrandr plugin survive the absence of Xrandr
* Sat Apr 5 2008 - Soren Sandmann <sandmann@redhat.com> - 2.22.1-2008.03.26.5
- Update randr plugin

View File

@ -0,0 +1,97 @@
Index: plugins/media-keys/gsd-media-keys-manager.c
===================================================================
--- plugins/media-keys/gsd-media-keys-manager.c (revision 327)
+++ plugins/media-keys/gsd-media-keys-manager.c (working copy)
@@ -42,6 +42,12 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#ifdef HAVE_X11_EXTENSIONS_XKB_H
+#include <X11/XKBlib.h>
+#include <X11/extensions/XKB.h>
+#include <gdk/gdkkeysyms.h>
+#endif
+
#include "gnome-settings-profile.h"
#include "gsd-marshal.h"
#include "gsd-media-keys-manager.h"
@@ -941,6 +947,65 @@
return NULL;
}
+static gboolean
+have_xkb (Display *dpy)
+{
+ static int have_xkb = -1;
+
+ if (have_xkb == -1) {
+#ifdef HAVE_X11_EXTENSIONS_XKB_H
+ int opcode, error_base, major, minor, xkb_event_base;
+
+ gdk_error_trap_push ();
+ have_xkb = XkbQueryExtension (dpy,
+ &opcode,
+ &xkb_event_base,
+ &error_base,
+ &major,
+ &minor)
+ && XkbUseExtension (dpy, &major, &minor);
+ gdk_error_trap_pop ();
+#else
+ have_xkb = 0;
+#endif
+ }
+
+ return have_xkb;
+}
+
+static gboolean
+match_key (Key *key, XEvent *event)
+{
+ GdkKeymap *keymap;
+ guint keyval;
+ GdkModifierType consumed;
+ gint group;
+
+ if (key == NULL)
+ return FALSE;
+
+ keymap = gdk_keymap_get_default ();
+ if (have_xkb (event->xkey.display))
+ group = XkbGroupForCoreState (event->xkey.state);
+ else
+ group = (event->xkey.state & GDK_Mode_switch) ? 1 : 0;
+ /* Check if we find a keysym that matches our current state */
+ if (gdk_keymap_translate_keyboard_state (keymap, event->xkey.keycode,
+ event->xkey.state, group,
+ &keyval, NULL, NULL, &consumed)) {
+ guint lower, upper;
+
+ gdk_keyval_convert_case (keyval, &lower, &upper);
+ return ((lower == key->keysym || upper == key->keysym)
+ && (key->state & ~consumed & USED_MODS) == key->state);
+ }
+
+ /* The key we passed doesn't have a keysym, so try with just the keycode */
+ return (key != NULL
+ && key->keycode == event->xkey.keycode
+ && key->state == (event->xkey.state & USED_MODS));
+}
+
static GdkFilterReturn
acme_filter_events (GdkXEvent *xevent,
GdkEvent *event,
@@ -962,12 +1027,7 @@
state = xev->xkey.state;
for (i = 0; i < HANDLED_KEYS; i++) {
- if (keys[i].key == NULL) {
- continue;
- }
-
- if (keys[i].key->keycode == keycode
- && (state & USED_MODS) == keys[i].key->state) {
+ if (match_key (keys[i].key, xev)) {
switch (keys[i].key_type) {
case VOLUME_DOWN_KEY:
case VOLUME_UP_KEY:

View File

@ -1 +1 @@
24a2405be0eccc8549fb357e02cc553e gnome-settings-daemon-2.22.1.tar.bz2
f4dd22b68ffd7cb0b6f6ebd570ad4365 gnome-settings-daemon-2.22.2.1.tar.bz2

15
xrandr-missingok.patch Normal file
View File

@ -0,0 +1,15 @@
diff -up gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.xrandr-missingok gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c
--- gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c.xrandr-missingok 2008-04-22 13:39:45.000000000 -0400
+++ gnome-settings-daemon-2.22.1/plugins/xrandr/gsd-xrandr-manager.c 2008-04-22 13:39:50.000000000 -0400
@@ -146,6 +146,11 @@ gsd_xrandr_manager_start (GsdXrandrManag
{
g_debug ("Starting xrandr manager");
+ if (manager->priv->rw_screen == NULL) {
+ g_set_error (error, 0, 0, "Failed to initialize XRandr extension");
+ return FALSE;
+ }
+
manager->priv->running = TRUE;
if (manager->priv->keycode) {