diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-11-10 20:03:34 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2022-11-10 20:03:34 -0600 |
commit | afa02936270ad2f0f4b82f7fbfd0fcf92845b5d2 (patch) | |
tree | 6d9d20fa5cbe4df3ebe86026174bf9d89765f77e /registryd | |
parent | a3894575b93bd872f2994ff8b72931948f7b6064 (diff) | |
download | at-spi2-core-afa02936270ad2f0f4b82f7fbfd0fcf92845b5d2.tar.gz |
Move spi_clear_error_state() to the X11 code
Both deviceeventcontroller.c and deviceeventcontroller-x11.c had
static spi_error_code variables, but spi_clear_error_state() was
looking at a different variable than the one set by the X error
handler. I think this was just an oversight.
Diffstat (limited to 'registryd')
-rw-r--r-- | registryd/deviceeventcontroller-x11.c | 8 | ||||
-rw-r--r-- | registryd/deviceeventcontroller.c | 11 | ||||
-rw-r--r-- | registryd/deviceeventcontroller.h | 2 |
3 files changed, 8 insertions, 13 deletions
diff --git a/registryd/deviceeventcontroller-x11.c b/registryd/deviceeventcontroller-x11.c index 010fdf0a..557410af 100644 --- a/registryd/deviceeventcontroller-x11.c +++ b/registryd/deviceeventcontroller-x11.c @@ -677,6 +677,14 @@ global_filter_fn (XEvent *xevent, void *data) return; } +static gboolean +spi_clear_error_state (void) +{ + gboolean retval = spi_error_code != 0; + spi_error_code = 0; + return retval; +} + static int _spi_controller_device_error_handler (Display *display, XErrorEvent *error) { diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index 8c9c8f8a..c68909c5 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -70,9 +70,6 @@ typedef struct { } SpiDEControllerPrivate; #endif -/* A pointer to our parent object class */ -static int spi_error_code = 0; - typedef struct { gint x; gint y; @@ -1234,14 +1231,6 @@ spi_controller_notify_keylisteners (SpiDEController *controller, } gboolean -spi_clear_error_state (void) -{ - gboolean retval = spi_error_code != 0; - spi_error_code = 0; - return retval; -} - -gboolean spi_controller_update_key_grabs (SpiDEController *controller, Accessibility_DeviceEvent *recv) { diff --git a/registryd/deviceeventcontroller.h b/registryd/deviceeventcontroller.h index 46ea1697..691a3afa 100644 --- a/registryd/deviceeventcontroller.h +++ b/registryd/deviceeventcontroller.h @@ -141,8 +141,6 @@ GType spi_device_event_controller_get_type (void); SpiDEController *spi_device_event_controller_new (SpiRegistry *registry, DBusConnection *bus); -gboolean spi_clear_error_state (void); - void spi_device_event_controller_start_poll_mouse (SpiRegistry *registry); void spi_device_event_controller_stop_poll_mouse (void); |