Skip to content

Commit

Permalink
modalDialog.js: Disable the lightbox if the virtual keyboard
Browse files Browse the repository at this point in the history
is enabled.

Move modal dialog back to uiGroup, but position it based on the
workarea (not monitor).
  • Loading branch information
mtwebster committed Jan 2, 2025
1 parent e3dbc51 commit 3bed0fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
6 changes: 0 additions & 6 deletions js/ui/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ 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
20 changes: 2 additions & 18 deletions js/ui/modalDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var ModalDialog = GObject.registerClass({
});

params = Params.parse(params, {
cinnamonReactive: false,
cinnamonReactive: Main.virtualKeyboard.enabled,
styleClass: null,
destroyOnClose: true,
});
Expand All @@ -84,9 +84,7 @@ var ModalDialog = GObject.registerClass({
this._cinnamonReactive = params.cinnamonReactive;
this._destroyOnClose = params.destroyOnClose;

this.connect('destroy', this._onDestroy.bind(this));

Main.layoutManager.modalDialogGroup.add_child(this);
Main.uiGroup.add_actor(this);

let constraint = new Clutter.BindConstraint({
source: global.stage,
Expand Down Expand Up @@ -240,8 +238,6 @@ var ModalDialog = GObject.registerClass({
if (!this.pushModal(timestamp))
return false;

Main.panelManager.disablePanels();

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

Main.panelManager.enablePanels();

this.ease({
opacity: 0,
duration: this.openAndCloseTime,
Expand Down Expand Up @@ -371,16 +365,6 @@ var ModalDialog = GObject.registerClass({
}
});
}

/**
* _onDestroy:
*
* This is called when the dialog actor is destroyed, either
* by destroying its container or by explicitly calling this.destroy().
*/
_onDestroy() {
Main.panelManager.enablePanels();
}
});

/**
Expand Down
4 changes: 4 additions & 0 deletions js/ui/virtualKeyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,5 +551,9 @@ Keyboard.prototype = {

get Name() {
return 'cinnamon';
},

get enabled() {
return this._enableKeyboard;
}
};

3 comments on commit 3bed0fb

@tutralex
Copy link

@tutralex tutralex commented on 3bed0fb Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work for "Onboard" (launchpad.net/onboard) virtual keyboard.

@tutralex
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to disabling the lightbox and accessing the taskbar and application menu, you also need access to desktop application windows.

@JosephMcc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how everyone feels about it, but onboard doesn't have much a future. As far as I know it's a no-op in wayland in it's current state. This issue has also made us realize that we need to look at fixing up our inbuilt keyboard going forward. That's just too big a project to do during a beta.

Please sign in to comment.