summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-11-18 11:03:36 +0000
committerMike Gorse <mgorse@suse.com>2016-11-19 03:11:06 -0600
commit0f3d979dc297790d8a98fab734d45751bf4fec85 (patch)
tree2534db46fc2c29188c96330aeeb2d564fd948f1a
parente6ec6dfdf97a4d13594e3e45ae4462feaa46d94e (diff)
downloadat-spi2-core-0f3d979dc297790d8a98fab734d45751bf4fec85.tar.gz
Ensure that X11 symbols are only used when necessary
Since at-spi2-core can be build with X11 support disabled, we need to ensure that we include and build the X11-specific bits only when needed. https://bugzilla.gnome.org/show_bug.cgi?id=773710
-rw-r--r--registryd/Makefile.am12
-rw-r--r--registryd/deviceeventcontroller.c12
2 files changed, 14 insertions, 10 deletions
diff --git a/registryd/Makefile.am b/registryd/Makefile.am
index c9c9d395..1ea3fd0f 100644
--- a/registryd/Makefile.am
+++ b/registryd/Makefile.am
@@ -28,7 +28,7 @@ at_spi2_registryd_SOURCES = \
de-marshaller.h \
de-marshaller.c \
de-types.h \
- keymasks.h \
+ keymasks.h \
paths.h \
registry-main.c \
registry.c \
@@ -38,15 +38,15 @@ at_spi2_registryd_SOURCES = \
deviceeventcontroller.c \
deviceeventcontroller.h \
reentrant-list.c \
- reentrant-list.h \
- ucs2keysym.c
+ reentrant-list.h
X11_SOURCES = \
deviceeventcontroller-x11.c \
- display.h \
- display.c \
+ display.h \
+ display.c \
event-source.c \
- event-source.h
+ event-source.h \
+ ucs2keysym.c
if USE_X11
at_spi2_registryd_SOURCES += $(X11_SOURCES)
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 8fefbd75..0c965ef6 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -23,7 +23,7 @@
/* deviceeventcontroller.c: implement the DeviceEventController interface */
-#include <config.h>
+#include "config.h"
#undef SPI_XKB_DEBUG
#undef SPI_DEBUG
@@ -39,11 +39,14 @@
#include <dbus/dbus.h>
#include "paths.h"
-#include "keymasks.h"
#include "de-types.h"
#include "de-marshaller.h"
+#include "keymasks.h"
+
+#ifdef HAVE_X11
#include "display.h"
#include "event-source.h"
+#endif
#include "deviceeventcontroller.h"
#include "reentrant-list.h"
@@ -64,6 +67,7 @@ struct _SpiPoint {
gint y;
};
typedef struct _SpiPoint SpiPoint;
+
static unsigned int mouse_mask_state = 0;
static unsigned int key_modifier_mask =
SPI_KEYMASK_MOD1 | SPI_KEYMASK_MOD2 | SPI_KEYMASK_MOD3 | SPI_KEYMASK_MOD4 |
@@ -634,7 +638,7 @@ handle_keygrab (SpiDEController *controller,
grab_mask.mod_mask = key_listener->mask;
if (g_slist_length (key_listener->keys) == 0) /* special case means AnyKey/AllKeys */
{
- grab_mask.key_val = AnyKey;
+ grab_mask.key_val = 0L; /* AnyKey */
#ifdef SPI_DEBUG
fprintf (stderr, "AnyKey grab!");
#endif
@@ -1751,7 +1755,7 @@ impl_generate_keyboard_event (DBusConnection *bus, DBusMessage *message, void *u
* in our arg list; it can contain either
* a keycode or a keysym.
*/
- spi_dec_synth_keysym (controller, (KeySym) keycode);
+ spi_dec_synth_keysym (controller, keycode);
break;
case Accessibility_KEY_STRING:
if (!spi_dec_plat_synth_keystring (controller, synth_type, keycode, keystring))