* regen PLIST * use FAKE_FLAGS * add a comment to patch-gnome-settings-daemon_gnome-settings-module_c * remove bogus chunk from patch-plugins_media-keys_gsd-media-keys-manager_c
84 lines
2.7 KiB
Plaintext
84 lines
2.7 KiB
Plaintext
$OpenBSD: patch-gnome-settings-daemon_gnome-settings-module_c,v 1.3 2009/11/12 00:14:53 jasper Exp $
|
|
|
|
- disable loading of the keyboard plugin under VNC-like displays, prevents
|
|
crasher with VNC displays.
|
|
|
|
--- gnome-settings-daemon/gnome-settings-module.c.orig Sun May 3 20:15:30 2009
|
|
+++ gnome-settings-daemon/gnome-settings-module.c Mon Oct 12 00:43:13 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 ("%s", 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 ("%s", 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;
|
|
|
|
- return TRUE;
|
|
+ }
|
|
}
|
|
|
|
static void
|