[gnome-shell/gnome-41] keyboard: Reset height before requesting preferred height
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-41] keyboard: Reset height before requesting preferred height
- Date: Sat, 28 May 2022 12:07:32 +0000 (UTC)
commit 040a5d34d7a5601ad2a2f622fd9a393c5e08be5f
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu May 26 18:13:12 2022 +0200
keyboard: Reset height before requesting preferred height
If we don't set the height property to -1 before requesting the
preferred height, get_preferred_height() will just return us the fixed
height that has been set before. We don't want this behavior here, so
set the height to -1 before calling get_preferred_height().
This fixes a resizing issue where the keyboard is sized incorrectly
after switching the monitor into portrait mode and back.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2306>
(cherry picked from commit a3bfe0ab560ed214c888b79daca89975fed9604e)
js/ui/keyboard.js | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 639a742737..be7c9277d1 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1695,6 +1695,7 @@ var Keyboard = GObject.registerClass({
* we allow the OSK being smaller than 1/3rd of the monitor height
* there.
*/
+ this.height = -1;
const forWidth = this.get_theme_node().adjust_for_width(monitor.width);
const [, natHeight] = this.get_preferred_height(forWidth);
this.height = Math.min(maxHeight, natHeight);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]