From 94826d1b0f1b37d1956d5938626c20d165947fcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@redhat.com>
Date: Tue, 30 Nov 2021 18:38:51 +0100
Subject: [PATCH] Fix on-screen keyboard when showing window-list

Resolves: #2019866
---
 0001-window-list-Fix-OSK.patch | 38 ++++++++++++++++++++++++++++++++++
 gnome-shell-extensions.spec    |  7 ++++++-
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 0001-window-list-Fix-OSK.patch

diff --git a/0001-window-list-Fix-OSK.patch b/0001-window-list-Fix-OSK.patch
new file mode 100644
index 0000000..819481c
--- /dev/null
+++ b/0001-window-list-Fix-OSK.patch
@@ -0,0 +1,38 @@
+From b2f2e37590baa44bbdd1e776b9f5b7a3cea3ae1d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
+Date: Fri, 26 Nov 2021 20:01:40 +0100
+Subject: [PATCH] window-list: Fix OSK
+
+The reveal animation moved from Main.layoutManager.keyboardBox to
+the keyboard itself, so instead of applying an additional translation
+for the bottom panel, we override the translation that would reveal
+the keyboard (and thus prevent it from showing altogether).
+
+Fix this by moving our translation to the keyboardBox instead.
+
+Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/199>
+---
+ extensions/window-list/extension.js | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
+index f7ecd190..8bca68c2 100644
+--- a/extensions/window-list/extension.js
++++ b/extensions/window-list/extension.js
+@@ -918,11 +918,8 @@ class WindowList extends St.Widget {
+     }
+ 
+     _updateKeyboardAnchor() {
+-        if (!Main.keyboard.keyboardActor)
+-            return;
+-
+-        let translationY = Main.overview.visible ? 0 : this.height;
+-        Main.keyboard.keyboardActor.translation_y = -translationY;
++        const translationY = Main.overview.visible ? 0 : this.height;
++        Main.layoutManager.keyboardBox.translation_y = -translationY;
+     }
+ 
+     _onAppStateChanged(appSys, app) {
+-- 
+2.33.1
+
diff --git a/gnome-shell-extensions.spec b/gnome-shell-extensions.spec
index 9be3d51..cdb01b0 100644
--- a/gnome-shell-extensions.spec
+++ b/gnome-shell-extensions.spec
@@ -7,7 +7,7 @@
 
 Name:           gnome-shell-extensions
 Version:        40.4
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Modify and extend GNOME Shell functionality and behavior
 
 License:        GPLv2+
@@ -33,6 +33,7 @@ Patch010: 0001-heads-up-display-Add-extension-for-showing-persisten.patch
 Patch011: 0001-Add-gesture-inhibitor-extension.patch
 Patch012: gnome-classic-wayland.patch
 Patch013: 0001-desktop-icons-Fix-stuck-grab-issue-with-rubber-bandi.patch
+Patch014: 0001-window-list-Fix-OSK.patch
 
 %description
 GNOME Shell Extensions is a collection of extensions providing additional and
@@ -389,6 +390,10 @@ workspaces.
 
 
 %changelog
+* Tue Nov 30 2021 Florian Müllner <fmuellner@redhat.com> - 40.4-8
+- Fix on-screen keyboard when showing window-list
+  Resolves: #2019866
+
 * Thu Nov 18 2021 Florian Müllner <fmuellner@redhat.com> - 40.4-7
 - Prevent gnome-shell from re-enabling inhibited gestures
   Resolves: #2013196