From 932b9da51a27663230a27d3e31cddee04528254a Mon Sep 17 00:00:00 2001 From: JosephMcc Date: Wed, 1 Jan 2025 08:31:19 -0800 Subject: [PATCH] Fix the onscreen keyboard not working when a modal dialog is open (#12599) --- js/ui/layout.js | 6 ++++++ js/ui/modalDialog.js | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index e9eeceeb7c..c7b329404e 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -284,6 +284,12 @@ LayoutManager.prototype = { this.enabledEdgeFlip = global.settings.get_boolean("enable-edge-flip"); this.edgeFlipDelay = global.settings.get_int("edge-flip-delay"); + this.modalDialogGroup = new St.Widget({ + name: 'modalDialogGroup', + layout_manager: new Clutter.BinLayout(), + }); + Main.uiGroup.add_child(this.modalDialogGroup); + this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox', reactive: true, track_hover: true }); diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 4d39b3fee6..2d7ca4f0e0 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -84,7 +84,7 @@ var ModalDialog = GObject.registerClass({ this._cinnamonReactive = params.cinnamonReactive; this._destroyOnClose = params.destroyOnClose; - Main.uiGroup.add_actor(this); + Main.layoutManager.modalDialogGroup.add_child(this); let constraint = new Clutter.BindConstraint({ source: global.stage, @@ -98,7 +98,7 @@ var ModalDialog = GObject.registerClass({ x_fill: true, y_fill: true }); - this._monitorConstraint = new Layout.MonitorConstraint(); + this._monitorConstraint = new Layout.MonitorConstraint({ work_area: true }); this._backgroundBin.add_constraint(this._monitorConstraint); this.add_actor(this._backgroundBin); @@ -238,6 +238,8 @@ var ModalDialog = GObject.registerClass({ if (!this.pushModal(timestamp)) return false; + Main.panelManager.disablePanels(); + this._fadeOpen(); return true; } @@ -257,6 +259,8 @@ var ModalDialog = GObject.registerClass({ this.popModal(timestamp); this._savedKeyFocus = null; + Main.panelManager.enablePanels(); + this.ease({ opacity: 0, duration: this.openAndCloseTime,