Blame SOURCES/0001-backends-Move-MetaKeyboardA11yFlags-to-a-public-head.patch

5c9faf
From 651f5e0c6a33d9ac32c2a16735a026153a2ddf38 Mon Sep 17 00:00:00 2001
5c9faf
From: Olivier Fourdan <ofourdan@redhat.com>
5c9faf
Date: Tue, 14 Jun 2022 16:31:43 +0200
5c9faf
Subject: [PATCH] backends: Move MetaKeyboardA11yFlags to a public header
5c9faf
5c9faf
The MetaKeyboardA11yFlags are used by gnome-shell to show a dialog
5c9faf
whenever a keyboard accessibility feature is switched using the
5c9faf
keyboard.
5c9faf
5c9faf
Unfortunately, commit c3acaeb25 renamed the Clutter flag to Meta and
5c9faf
moved them to a private header. As a result, gnome-shell do not show any
5c9faf
dialog anymore when a keyboard accessibility feature is activated.
5c9faf
5c9faf
Move the MetaKeyboardA11yFlags definition to a public header so that
5c9faf
gnome-shell can use it.
5c9faf
5c9faf
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2306
5c9faf
Fixes: c3acaeb25 - backends: Move keyboard a11y into backends
5c9faf
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2463>
5c9faf
---
5c9faf
 src/backends/meta-input-settings-private.h | 19 +------
5c9faf
 src/meta/meson.build                       |  1 +
5c9faf
 src/meta/meta-enums.h                      | 62 ++++++++++++++++++++++
5c9faf
 3 files changed, 64 insertions(+), 18 deletions(-)
5c9faf
 create mode 100644 src/meta/meta-enums.h
5c9faf
5c9faf
diff --git a/src/backends/meta-input-settings-private.h b/src/backends/meta-input-settings-private.h
5c9faf
index 42ee0e0e6..5ef54ee84 100644
5c9faf
--- a/src/backends/meta-input-settings-private.h
5c9faf
+++ b/src/backends/meta-input-settings-private.h
5c9faf
@@ -31,29 +31,12 @@
5c9faf
 #include "backends/meta-backend-types.h"
5c9faf
 #include "clutter/clutter.h"
5c9faf
 #include "meta/display.h"
5c9faf
+#include "meta/meta-enums.h"
5c9faf
 
5c9faf
 #define META_TYPE_INPUT_SETTINGS (meta_input_settings_get_type ())
5c9faf
 G_DECLARE_DERIVABLE_TYPE (MetaInputSettings, meta_input_settings,
5c9faf
                           META, INPUT_SETTINGS, GObject)
5c9faf
 
5c9faf
-typedef enum
5c9faf
-{
5c9faf
-  META_A11Y_KEYBOARD_ENABLED = 1 << 0,
5c9faf
-  META_A11Y_TIMEOUT_ENABLED = 1 << 1,
5c9faf
-  META_A11Y_MOUSE_KEYS_ENABLED = 1 << 2,
5c9faf
-  META_A11Y_SLOW_KEYS_ENABLED = 1 << 3,
5c9faf
-  META_A11Y_SLOW_KEYS_BEEP_PRESS = 1 << 4,
5c9faf
-  META_A11Y_SLOW_KEYS_BEEP_ACCEPT = 1 << 5,
5c9faf
-  META_A11Y_SLOW_KEYS_BEEP_REJECT = 1 << 6,
5c9faf
-  META_A11Y_BOUNCE_KEYS_ENABLED = 1 << 7,
5c9faf
-  META_A11Y_BOUNCE_KEYS_BEEP_REJECT = 1 << 8,
5c9faf
-  META_A11Y_TOGGLE_KEYS_ENABLED = 1 << 9,
5c9faf
-  META_A11Y_STICKY_KEYS_ENABLED = 1 << 10,
5c9faf
-  META_A11Y_STICKY_KEYS_TWO_KEY_OFF = 1 << 11,
5c9faf
-  META_A11Y_STICKY_KEYS_BEEP = 1 << 12,
5c9faf
-  META_A11Y_FEATURE_STATE_CHANGE_BEEP = 1 << 13,
5c9faf
-} MetaKeyboardA11yFlags;
5c9faf
-
5c9faf
 /**
5c9faf
  * MetaKbdA11ySettings:
5c9faf
  *
5c9faf
diff --git a/src/meta/meson.build b/src/meta/meson.build
5c9faf
index a096ee4dd..4a67abb25 100644
5c9faf
--- a/src/meta/meson.build
5c9faf
+++ b/src/meta/meson.build
5c9faf
@@ -17,6 +17,7 @@ mutter_public_headers = [
5c9faf
   'meta-close-dialog.h',
5c9faf
   'meta-cursor-tracker.h',
5c9faf
   'meta-dnd.h',
5c9faf
+  'meta-enums.h',
5c9faf
   'meta-idle-monitor.h',
5c9faf
   'meta-inhibit-shortcuts-dialog.h',
5c9faf
   'meta-launch-context.h',
5c9faf
diff --git a/src/meta/meta-enums.h b/src/meta/meta-enums.h
5c9faf
new file mode 100644
5c9faf
index 000000000..e59ebaf72
5c9faf
--- /dev/null
5c9faf
+++ b/src/meta/meta-enums.h
5c9faf
@@ -0,0 +1,62 @@
5c9faf
+/*
5c9faf
+ * Copyright (C) 2016-2021 Red Hat Inc.
5c9faf
+ *
5c9faf
+ * This program is free software; you can redistribute it and/or
5c9faf
+ * modify it under the terms of the GNU General Public License as
5c9faf
+ * published by the Free Software Foundation; either version 2 of the
5c9faf
+ * License, or (at your option) any later version.
5c9faf
+ *
5c9faf
+ * This program is distributed in the hope that it will be useful, but
5c9faf
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
5c9faf
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5c9faf
+ * General Public License for more details.
5c9faf
+ *
5c9faf
+ * You should have received a copy of the GNU General Public License
5c9faf
+ * along with this program; if not, write to the Free Software
5c9faf
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5c9faf
+ * 02111-1307, USA.
5c9faf
+ *
5c9faf
+ */
5c9faf
+
5c9faf
+#ifndef META_ENUMS_H
5c9faf
+#define META_ENUMS_H
5c9faf
+
5c9faf
+/**
5c9faf
+ * MetaKeyboardA11yFlags:
5c9faf
+ * @META_A11Y_KEYBOARD_ENABLED:
5c9faf
+ * @META_A11Y_TIMEOUT_ENABLED:
5c9faf
+ * @META_A11Y_MOUSE_KEYS_ENABLED:
5c9faf
+ * @META_A11Y_SLOW_KEYS_ENABLED:
5c9faf
+ * @META_A11Y_SLOW_KEYS_BEEP_PRESS:
5c9faf
+ * @META_A11Y_SLOW_KEYS_BEEP_ACCEPT:
5c9faf
+ * @META_A11Y_SLOW_KEYS_BEEP_REJECT:
5c9faf
+ * @META_A11Y_BOUNCE_KEYS_ENABLED:
5c9faf
+ * @META_A11Y_BOUNCE_KEYS_BEEP_REJECT:
5c9faf
+ * @META_A11Y_TOGGLE_KEYS_ENABLED:
5c9faf
+ * @META_A11Y_STICKY_KEYS_ENABLED:
5c9faf
+ * @META_A11Y_STICKY_KEYS_TWO_KEY_OFF:
5c9faf
+ * @META_A11Y_STICKY_KEYS_BEEP:
5c9faf
+ * @META_A11Y_FEATURE_STATE_CHANGE_BEEP:
5c9faf
+ *
5c9faf
+ * Keyboard accessibility features.
5c9faf
+ *
5c9faf
+ */
5c9faf
+typedef enum
5c9faf
+{
5c9faf
+  META_A11Y_KEYBOARD_ENABLED = 1 << 0,
5c9faf
+  META_A11Y_TIMEOUT_ENABLED = 1 << 1,
5c9faf
+  META_A11Y_MOUSE_KEYS_ENABLED = 1 << 2,
5c9faf
+  META_A11Y_SLOW_KEYS_ENABLED = 1 << 3,
5c9faf
+  META_A11Y_SLOW_KEYS_BEEP_PRESS = 1 << 4,
5c9faf
+  META_A11Y_SLOW_KEYS_BEEP_ACCEPT = 1 << 5,
5c9faf
+  META_A11Y_SLOW_KEYS_BEEP_REJECT = 1 << 6,
5c9faf
+  META_A11Y_BOUNCE_KEYS_ENABLED = 1 << 7,
5c9faf
+  META_A11Y_BOUNCE_KEYS_BEEP_REJECT = 1 << 8,
5c9faf
+  META_A11Y_TOGGLE_KEYS_ENABLED = 1 << 9,
5c9faf
+  META_A11Y_STICKY_KEYS_ENABLED = 1 << 10,
5c9faf
+  META_A11Y_STICKY_KEYS_TWO_KEY_OFF = 1 << 11,
5c9faf
+  META_A11Y_STICKY_KEYS_BEEP = 1 << 12,
5c9faf
+  META_A11Y_FEATURE_STATE_CHANGE_BEEP = 1 << 13,
5c9faf
+} MetaKeyboardA11yFlags;
5c9faf
+
5c9faf
+#endif /* META_ENUMS_H */
5c9faf
-- 
5c9faf
2.36.1
5c9faf