gnome-shell r7 - trunk/src
- From: otaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-shell r7 - trunk/src
- Date: Fri, 31 Oct 2008 18:02:52 +0000 (UTC)
Author: otaylor
Date: Fri Oct 31 18:02:52 2008
New Revision: 7
URL: http://svn.gnome.org/viewvc/gnome-shell?rev=7&view=rev
Log:
Add an xevent_filter method to our plugin
By default, mutter doesn't pass events to clutter. We need to add an
xevent_filter method to our plugin and do that ourselves.
Modified:
trunk/src/gnome-shell-plugin.c
Modified: trunk/src/gnome-shell-plugin.c
==============================================================================
--- trunk/src/gnome-shell-plugin.c (original)
+++ trunk/src/gnome-shell-plugin.c Fri Oct 31 18:02:52 2008
@@ -29,6 +29,7 @@
#include <glib/gi18n-lib.h>
#include <clutter/clutter.h>
+#include <clutter/x11/clutter-x11.h>
#include <gjs/gjs.h>
#include <gmodule.h>
#include <string.h>
@@ -38,6 +39,7 @@
static gboolean do_init (const char *params);
static gboolean reload (const char *params);
+static gboolean xevent_filter (XEvent *xev);
/*
* Create the plugin struct; function pointers initialized in
@@ -72,6 +74,9 @@
/* The reload handler */
plugin->reload = reload;
+ /* Event handling */
+ plugin->xevent_filter = xevent_filter;
+
return NULL;
}
@@ -159,6 +164,12 @@
return FALSE;
}
+static gboolean
+xevent_filter (XEvent *xev)
+{
+ return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
+}
+
/*
* GModule unload function -- do any cleanup required.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]