diff options
Diffstat (limited to 'plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c')
-rw-r--r-- | plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c b/plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c index 0873f0a..a45ef47 100644 --- a/plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c +++ b/plugins/a11y-keyboard/msd-a11y-keyboard-atspi.c @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2020 Colomban Wendling <[email protected]> + * Copyright (C) 2012-2021 MATE Developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -54,16 +55,16 @@ msd_a11y_keyboard_atspi_class_init (MsdA11yKeyboardAtspiClass *klass) } static gboolean -on_key_press_event (const AtspiDeviceEvent *event, - void *user_data G_GNUC_UNUSED) +on_key_press_event (AtspiDeviceEvent *event, + void *user_data G_GNUC_UNUSED) { /* don't ring on capslock itself, that's taken care of by togglekeys * if the user want it. */ - if (event->id == GDK_KEY_Caps_Lock) - return FALSE; - - gdk_display_beep (gdk_display_get_default ()); + if (event->id != GDK_KEY_Caps_Lock) + gdk_display_beep (gdk_display_get_default ()); + /* cast the possible erroneous const away with atspi < 2.40 */ + g_boxed_free (ATSPI_TYPE_DEVICE_EVENT, (gpointer) event); return FALSE; } |