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

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