Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ class AppMenuButtonRightClickMenu extends Applet.AppletPopupMenu {
// user needs to switch workspaces just to switch the window back. This should behave this way
// when showAllWorkspaces is disabled as well since its a UX problem.
if (hasWindows) {
// Always on top
if (this.groupState.lastFocused && this.groupState.lastFocused.is_above()) {
item = createMenuItem({label: _('Do not stay on top')});
this.signals.connect(item, 'activate', () => {
this.groupState.lastFocused.unmake_above();
});
this.addMenuItem(item);
} else {
item = createMenuItem({label: _('Always on top')});
this.signals.connect(item, 'activate', () => {
this.groupState.lastFocused.make_above();
});
this.addMenuItem(item);
}

// Monitors
if (Main.layoutManager.monitors.length > 1) {
const connectMonitorEvent = (item, i) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,21 @@ class AppMenuButtonRightClickMenu extends Applet.AppletPopupMenu {
let item;
let length;

// Always on top
if (mw.is_above()) {
item = new PopupMenu.PopupMenuItem(_("Do not stay on top"));
this._signals.connect(item, 'activate', function() {
mw.unmake_above();
});
this.addMenuItem(item);
} else {
item = new PopupMenu.PopupMenuItem(_("Always on top"));
this._signals.connect(item, 'activate', function() {
mw.make_above();
});
this.addMenuItem(item);
}

// Move to monitor
if ((length = Main.layoutManager.monitors.length) == 2) {
Main.layoutManager.monitors.forEach(function (monitor, index) {
Expand Down
Loading