- Build snapshot
This commit is contained in:
		
							parent
							
								
									f280d957c5
								
							
						
					
					
						commit
						696b8d2a8c
					
				| @ -1 +1 @@ | ||||
| gnome-settings-daemon-2.23.1.1.tar.bz2 | ||||
| gnome-settings-daemon-2.23.2.tar.bz2 | ||||
|  | ||||
| @ -1,60 +0,0 @@ | ||||
| diff -up gnome-settings-daemon-2.22.1/plugins/keyboard/gsd-keyboard-xkb.c.gdm-keyboard-layout gnome-settings-daemon-2.22.1/plugins/keyboard/gsd-keyboard-xkb.c
 | ||||
| --- gnome-settings-daemon-2.22.1/plugins/keyboard/gsd-keyboard-xkb.c.gdm-keyboard-layout	2008-05-05 01:56:06.000000000 -0400
 | ||||
| +++ gnome-settings-daemon-2.22.1/plugins/keyboard/gsd-keyboard-xkb.c	2008-05-05 02:04:56.000000000 -0400
 | ||||
| @@ -54,6 +54,8 @@ static void *pa_callback_user_data = NUL
 | ||||
|  static const char KNOWN_FILES_KEY[] = | ||||
|      "/desktop/gnome/peripherals/keyboard/general/known_file_list"; | ||||
|   | ||||
| +static char *gdm_keyboard_layout = NULL;
 | ||||
| +
 | ||||
|  #define noGSDKX | ||||
|   | ||||
|  #ifdef GSDKX | ||||
| @@ -137,6 +139,8 @@ apply_xkb_settings (void)
 | ||||
|  { | ||||
|          GConfClient       *conf_client; | ||||
|          GkbdKeyboardConfig current_sys_kbd_config; | ||||
| +	GSList *l;
 | ||||
| +	int i;
 | ||||
|   | ||||
|          if (!inited_ok) | ||||
|                  return; | ||||
| @@ -158,6 +162,29 @@ apply_xkb_settings (void)
 | ||||
|                  g_free (current_kbd_config.model); | ||||
|                  current_kbd_config.model = g_strdup ("evdev"); | ||||
|          } | ||||
| +
 | ||||
| +	/* Try to keep the same layout from the login screen
 | ||||
| +         */  
 | ||||
| +	if (gdm_keyboard_layout) {
 | ||||
| +		if (current_kbd_config.layouts_variants == NULL) {
 | ||||
| +			current_kbd_config.layouts_variants = g_slist_append (NULL, gdm_keyboard_layout);
 | ||||
| +			gconf_client_set_list (conf_client, 
 | ||||
| +					       GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
 | ||||
| +					       GCONF_VALUE_STRING,
 | ||||
| +					       current_kbd_config.layouts_variants,
 | ||||
| +					       NULL);
 | ||||
| +		}
 | ||||
| +		else {
 | ||||
| +			for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) {
 | ||||
| +				if (strcmp (gdm_keyboard_layout, l->data) == 0) {
 | ||||
| +					xkl_engine_lock_group (current_config.engine, i);
 | ||||
| +					break;
 | ||||
| +				}
 | ||||
| +			}
 | ||||
| +		}
 | ||||
| +		gdm_keyboard_layout = NULL;
 | ||||
| +	}
 | ||||
| +
 | ||||
|          /* Activate - only if different! */ | ||||
|          if (!gkbd_keyboard_config_equals | ||||
|              (¤t_kbd_config, ¤t_sys_kbd_config)) { | ||||
| @@ -312,6 +339,8 @@ gsd_keyboard_xkb_init (GConfClient * cli
 | ||||
|          xkl_set_log_appender (gsd_keyboard_log_appender); | ||||
|  #endif | ||||
|   | ||||
| +	gdm_keyboard_layout = g_getenv ("GDM_KEYBOARD_LAYOUT");
 | ||||
| +
 | ||||
|          xkl_engine = xkl_engine_get_instance (GDK_DISPLAY ()); | ||||
|          if (xkl_engine) { | ||||
|                  inited_ok = TRUE; | ||||
| @ -1,17 +1,16 @@ | ||||
| diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
 | ||||
| index a633167..7896d85 100644
 | ||||
| --- a/plugins/keyboard/gsd-keyboard-xkb.c
 | ||||
| +++ b/plugins/keyboard/gsd-keyboard-xkb.c
 | ||||
| @@ -152,6 +152,12 @@ apply_xkb_settings (void)
 | ||||
| --- gnome-settings-daemon-2.23.2/plugins/keyboard/gsd-keyboard-xkb.c.ignore-layout-if-using-evdev	2008-05-14 00:42:44.000000000 -0400
 | ||||
| +++ gnome-settings-daemon-2.23.2/plugins/keyboard/gsd-keyboard-xkb.c	2008-05-14 19:25:17.000000000 -0400
 | ||||
| @@ -181,6 +181,13 @@ apply_xkb_settings (void)
 | ||||
|                  gdm_keyboard_layout = NULL; | ||||
|          } | ||||
|   | ||||
|          gkbd_keyboard_config_load_from_x_current (¤t_sys_kbd_config, | ||||
|                                                    NULL); | ||||
| +        /* Ignore model if using evdev, since evdev needs its own model
 | ||||
| +         */
 | ||||
| +        if (strcmp (initial_sys_kbd_config.model, "evdev") == 0) {
 | ||||
| +                g_free (current_kbd_config.model);
 | ||||
| +                current_kbd_config.model = g_strdup ("evdev");
 | ||||
| +        }
 | ||||
| +
 | ||||
|          /* Activate - only if different! */ | ||||
|          if (!gkbd_keyboard_config_equals | ||||
|              (¤t_kbd_config, ¤t_sys_kbd_config)) { | ||||
|  | ||||
| @ -1,30 +0,0 @@ | ||||
| diff -up gnome-settings-daemon-2.22.1/plugins/background/libbackground/preferences.c.hide-white-screen gnome-settings-daemon-2.22.1/plugins/background/libbackground/preferences.c
 | ||||
| --- gnome-settings-daemon-2.22.1/plugins/background/libbackground/preferences.c.hide-white-screen	2008-03-31 10:37:43.000000000 -0400
 | ||||
| +++ gnome-settings-daemon-2.22.1/plugins/background/libbackground/preferences.c	2008-03-31 10:39:27.000000000 -0400
 | ||||
| @@ -252,6 +252,26 @@ bg_preferences_load (BGPreferences *pref
 | ||||
|  		else | ||||
|  			prefs->wallpaper_filename = g_filename_from_utf8 (tmp, -1, NULL, | ||||
|  									  NULL, NULL); | ||||
| +
 | ||||
| +		if (!g_file_test (prefs->wallpaper_filename, G_FILE_TEST_EXISTS)) {
 | ||||
| +			GConfValue *default_value;
 | ||||
| +			default_value = gconf_client_get_default_from_schema (client,
 | ||||
| +									      BG_PREFERENCES_DRAW_BACKGROUND, NULL);
 | ||||
| +			if (default_value != NULL) {
 | ||||
| +				prefs->enabled = gconf_value_get_bool (default_value);
 | ||||
| +				gconf_value_free (default_value);
 | ||||
| +
 | ||||
| +				g_free (prefs->wallpaper_filename);
 | ||||
| +				prefs->wallpaper_filename = NULL;
 | ||||
| +
 | ||||
| +				default_value = gconf_client_get_default_from_schema (client,
 | ||||
| +										      BG_PREFERENCES_PICTURE_FILENAME, NULL);
 | ||||
| +				if (default_value != NULL) {
 | ||||
| +					prefs->wallpaper_filename = g_strdup (gconf_value_get_string (default_value));
 | ||||
| +					gconf_value_free (default_value);
 | ||||
| +				}
 | ||||
| +			}
 | ||||
| +		}
 | ||||
|  	} | ||||
|  	g_free (tmp); | ||||
|   | ||||
| @ -1,13 +0,0 @@ | ||||
| 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
 | ||||
| @@ -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); | ||||
|   | ||||
| @ -1,6 +1,6 @@ | ||||
| Name:		gnome-settings-daemon | ||||
| Version:	2.23.1.1 | ||||
| Release:	5%{?dist} | ||||
| Version:	2.23.2 | ||||
| Release:	0.2008.05.14.1%{?dist} | ||||
| Summary:	The daemon sharing settings from GNOME to GTK+/KDE applications | ||||
| 
 | ||||
| Group:		System Environment/Daemons | ||||
| @ -17,7 +17,7 @@ BuildRequires:	dbus-glib-devel | ||||
| BuildRequires:	GConf2-devel | ||||
| BuildRequires:	gtk2-devel | ||||
| BuildRequires:	gnome-vfs2-devel | ||||
| BuildRequires:	gnome-desktop-devel >= 2.22.0-6 | ||||
| BuildRequires:	gnome-desktop-devel >= 2.23.2 | ||||
| BuildRequires:	libglade2-devel | ||||
| BuildRequires:	libgnomeui-devel | ||||
| BuildRequires:	libgnome-devel | ||||
| @ -30,19 +30,8 @@ BuildRequires:	perl(XML::Parser) | ||||
| 
 | ||||
| Patch1:         add-randr-12.patch | ||||
| Patch2:         gnome-settings-daemon-2.21.91-ignore-model-if-evdev.patch | ||||
| # https://bugzilla.redhat.com/show_bug.cgi?id=438942 | ||||
| # 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 | ||||
| # survive xrandr being absent (such as on Xnest in sabayon) | ||||
| Patch5:		xrandr-missingok.patch | ||||
| # http://bugzilla.gnome.org/show_bug.cgi?id=530356 | ||||
| # https://bugzilla.redhat.com/show_bug.cgi?id=346201 | ||||
| Patch6:         gsd-handle-different-keysyms.patch | ||||
| # http://bugzilla.gnome.org/show_bug.cgi?id=531487 | ||||
| Patch7:		gnome-settings-daemon-background-without-nautilus.patch | ||||
| # http://bugzilla.gnome.org/show_bug.cgi?id=531589 | ||||
| Patch8:		gdm-keyboard-layout.patch | ||||
| 
 | ||||
| %description | ||||
| A daemon to share settings from GNOME to other applications. It also | ||||
| @ -64,14 +53,7 @@ developing applications that use %{name}. | ||||
| 
 | ||||
| %patch1 -p1 -b .add-randr-12 | ||||
| %patch2 -p1 -b .ignore-layout-if-using-evdev | ||||
| pushd plugins/mouse/ | ||||
| %patch3 -p0 -b .no-eat-keys | ||||
| popd | ||||
| %patch4 -p1 -b .hide-white-screen | ||||
| %patch5 -p1 -b .xrandr-missingok | ||||
| %patch6 -p1 -b .multi-keysyms | ||||
| %patch7 -p1 -b .background-without-nautilus | ||||
| %patch8 -p1 -b .gdm-keyboard-layout | ||||
| 
 | ||||
| %build | ||||
| %configure --enable-static=no --enable-profiling | ||||
| @ -154,6 +136,9 @@ fi | ||||
| %{_libdir}/pkgconfig/gnome-settings-daemon.pc | ||||
| 
 | ||||
| %changelog | ||||
| * Wed May 14 2008 Jon McCann <jmccann@redhat.com> - 2.23.2-0.2008.05.14.1 | ||||
| - Build snapshot | ||||
| 
 | ||||
| * Tue May 13 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.1-1-5 | ||||
| - Rebuild | ||||
| 
 | ||||
|  | ||||
| @ -1,75 +0,0 @@ | ||||
| --- trunk/plugins/common/gsd-keygrab.c	2008/04/13 10:40:01	306
 | ||||
| +++ trunk/plugins/common/gsd-keygrab.c	2008/04/29 08:41:52	326
 | ||||
| @@ -24,6 +24,11 @@
 | ||||
|   | ||||
|  #include <gdk/gdk.h> | ||||
|  #include <gdk/gdkx.h> | ||||
| +#ifdef HAVE_X11_EXTENSIONS_XKB_H
 | ||||
| +#include <X11/XKBlib.h>
 | ||||
| +#include <X11/extensions/XKB.h>
 | ||||
| +#include <gdk/gdkkeysyms.h>
 | ||||
| +#endif
 | ||||
|   | ||||
|  #include "gsd-keygrab.h" | ||||
|   | ||||
| @@ -119,9 +124,60 @@
 | ||||
|          } | ||||
|  } | ||||
|   | ||||
| +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;
 | ||||
| +}
 | ||||
| +
 | ||||
|  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 & GSD_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 & GSD_USED_MODS)); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user