- Add patch from upstream to avoid the Stop button triggering an Eject
(#346201)
This commit is contained in:
parent
579bc11a45
commit
5a7ad8d906
@ -1,6 +1,6 @@
|
|||||||
Name: gnome-settings-daemon
|
Name: gnome-settings-daemon
|
||||||
Version: 2.23.1.1
|
Version: 2.23.1.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -36,6 +36,9 @@ Patch3: gsd-mouse-too-much-grab.patch
|
|||||||
Patch4: gnome-settings-daemon-2.22.1-hide-white-screen.patch
|
Patch4: gnome-settings-daemon-2.22.1-hide-white-screen.patch
|
||||||
# survive xrandr being absent (such as on Xnest in sabayon)
|
# survive xrandr being absent (such as on Xnest in sabayon)
|
||||||
Patch5: xrandr-missingok.patch
|
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
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A daemon to share settings from GNOME to other applications. It also
|
A daemon to share settings from GNOME to other applications. It also
|
||||||
@ -62,6 +65,7 @@ pushd plugins/mouse/
|
|||||||
popd
|
popd
|
||||||
%patch4 -p1 -b .hide-white-screen
|
%patch4 -p1 -b .hide-white-screen
|
||||||
%patch5 -p1 -b .xrandr-missingok
|
%patch5 -p1 -b .xrandr-missingok
|
||||||
|
%patch6 -p1 -b .multi-keysyms
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-static=no --enable-profiling
|
%configure --enable-static=no --enable-profiling
|
||||||
@ -144,6 +148,9 @@ fi
|
|||||||
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
|
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 29 2008 - Bastien Nocera <bnocera@redhat.com> - 2.22.1.1-2
|
||||||
|
- Add patch from upstream to avoid the Stop button triggering an Eject (#346201)
|
||||||
|
|
||||||
* Fri Apr 25 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.1.1-1
|
* Fri Apr 25 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.1.1-1
|
||||||
- Update to 2.23.1.1
|
- Update to 2.23.1.1
|
||||||
|
|
||||||
|
75
gsd-handle-different-keysyms.patch
Normal file
75
gsd-handle-different-keysyms.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
--- 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