- fix 2 crashes under VNC displays:
* patch-plugins_mouse_gsd-mouse-manager_c is from upstream SVN: fix crash with X servers that don't provide XInput * patch-gnome-settings-daemon_gnome-settings-module_c: disable loading of the keyboard plugin under VNC-like displays "commit it" jasper@
This commit is contained in:
parent
397631ee71
commit
3722d3b6f8
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2009/01/20 23:12:28 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2009/02/02 15:13:08 ajacoutot Exp $
|
||||
|
||||
COMMENT= GNOME settings daemon
|
||||
|
||||
GNOME_PROJECT= gnome-settings-daemon
|
||||
GNOME_VERSION= 2.24.1
|
||||
PKGNAME= ${DISTNAME}p4
|
||||
PKGNAME= ${DISTNAME}p5
|
||||
|
||||
# GPLv3
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
@ -51,4 +51,7 @@ CONFIGURE_ARGS+= --enable-gstreamer
|
||||
post-patch:
|
||||
@ln -s /usr/bin/true ${WRKDIR}/bin/scrollkeeper-update
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/gnome-settings-daemon/gnome-settings-module.c
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -0,0 +1,78 @@
|
||||
$OpenBSD: patch-gnome-settings-daemon_gnome-settings-module_c,v 1.1 2009/02/02 15:13:08 ajacoutot Exp $
|
||||
--- gnome-settings-daemon/gnome-settings-module.c.orig Tue Nov 25 00:02:42 2008
|
||||
+++ gnome-settings-daemon/gnome-settings-module.c Mon Feb 2 12:11:54 2009
|
||||
@@ -24,6 +24,11 @@
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
+#include <string.h>
|
||||
+
|
||||
+#include <gdk/gdk.h>
|
||||
+#include <gdk/gdkx.h>
|
||||
+
|
||||
typedef struct _GnomeSettingsModuleClass GnomeSettingsModuleClass;
|
||||
|
||||
struct _GnomeSettingsModuleClass
|
||||
@@ -56,33 +61,44 @@ gnome_settings_module_load (GTypeModule *gmodule)
|
||||
|
||||
g_debug ("Loading %s", module->path);
|
||||
|
||||
- module->library = g_module_open (module->path, 0);
|
||||
+ char const *vendor = ServerVendor (GDK_DISPLAY ());
|
||||
|
||||
- if (module->library == NULL) {
|
||||
- g_warning (g_module_error ());
|
||||
+ /*
|
||||
+ do not load the keyboard pluging on VNC-like displays:
|
||||
+ it makes gnome-settings-daemon crash
|
||||
+ */
|
||||
+ if (strcmp(module->path, "${PREFIX}/lib/gnome-settings-daemon-2.0/libkeyboard.so") == 0 && strcmp(vendor, "The X.Org Foundation") != 0 ) {
|
||||
+ g_debug ("Running under a VNC or alike display, disabling %s", module->path);
|
||||
+ return FALSE;
|
||||
+ } else {
|
||||
+ module->library = g_module_open (module->path, 0);
|
||||
|
||||
- return FALSE;
|
||||
- }
|
||||
+ if (module->library == NULL) {
|
||||
+ g_warning (g_module_error ());
|
||||
|
||||
- /* extract symbols from the lib */
|
||||
- res = g_module_symbol (module->library, "register_gnome_settings_plugin", (void *) ®ister_func);
|
||||
- if (! res) {
|
||||
- g_warning (g_module_error ());
|
||||
- g_module_close (module->library);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
- return FALSE;
|
||||
- }
|
||||
+ /* extract symbols from the lib */
|
||||
+ res = g_module_symbol (module->library, "register_gnome_settings_plugin", (void *) ®ister_func);
|
||||
+ if (! res) {
|
||||
+ g_warning (g_module_error ());
|
||||
+ g_module_close (module->library);
|
||||
|
||||
- g_assert (register_func);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
- module->type = register_func (gmodule);
|
||||
+ g_assert (register_func);
|
||||
|
||||
- if (module->type == 0) {
|
||||
- g_warning ("Invalid gnome settings plugin in module %s", module->path);
|
||||
- return FALSE;
|
||||
- }
|
||||
+ module->type = register_func (gmodule);
|
||||
|
||||
+ if (module->type == 0) {
|
||||
+ g_warning ("Invalid gnome settings plugin in module %s", module->path);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
return TRUE;
|
||||
+
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-plugins_mouse_gsd-mouse-manager_c,v 1.1 2009/02/02 15:13:08 ajacoutot Exp $
|
||||
|
||||
GNOME bug #562977:
|
||||
fix crash with X servers that don't provide XInput (e.g. VNC...)
|
||||
|
||||
--- plugins/mouse/gsd-mouse-manager.c.orig Tue Nov 25 00:02:41 2008
|
||||
+++ plugins/mouse/gsd-mouse-manager.c Fri Jan 30 22:55:58 2009
|
||||
@@ -327,9 +327,14 @@ devicepresence_filter (GdkXEvent *xevent,
|
||||
static void
|
||||
set_devicepresence_handler (GsdMouseManager *manager)
|
||||
{
|
||||
- Display *display = gdk_x11_get_default_xdisplay ();
|
||||
+ Display *display;
|
||||
XEventClass class_presence;
|
||||
int xi_presence;
|
||||
+
|
||||
+ if (!supports_xinput_devices ())
|
||||
+ return;
|
||||
+
|
||||
+ display = gdk_x11_get_default_xdisplay ();
|
||||
|
||||
gdk_error_trap_push ();
|
||||
DevicePresence (display, xi_presence, class_presence);
|
Loading…
Reference in New Issue
Block a user