Skip to content

Commit

Permalink
Fix the onscreen keyboard not working when a modal dialog is open (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephMcc authored Jan 1, 2025
1 parent 6bb2684 commit 932b9da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions js/ui/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
8 changes: 6 additions & 2 deletions js/ui/modalDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);

Expand Down Expand Up @@ -238,6 +238,8 @@ var ModalDialog = GObject.registerClass({
if (!this.pushModal(timestamp))
return false;

Main.panelManager.disablePanels();

this._fadeOpen();
return true;
}
Expand All @@ -257,6 +259,8 @@ var ModalDialog = GObject.registerClass({
this.popModal(timestamp);
this._savedKeyFocus = null;

Main.panelManager.enablePanels();

this.ease({
opacity: 0,
duration: this.openAndCloseTime,
Expand Down

0 comments on commit 932b9da

Please sign in to comment.