diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
index 81c51e1..2949347 100644
--- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
@@ -695,6 +695,10 @@
Provide monitor isolation
Dash shows only windows from the current monitor
+
+ false
+ Isolate monitors even with a single panel
+
true
Display the favorites on all monitors
diff --git a/src/appIcons.js b/src/appIcons.js
index da81d5c..f58fea5 100644
--- a/src/appIcons.js
+++ b/src/appIcons.js
@@ -1870,7 +1870,9 @@ export function getInterestingWindows(app, monitor, isolateMonitors) {
if (
monitor &&
- (isolateMonitors || SETTINGS.get_boolean('isolate-monitors'))
+ (isolateMonitors || SETTINGS.get_boolean('isolate-monitors')) &&
+ (SETTINGS.get_boolean('multi-monitors') ||
+ SETTINGS.get_boolean('isolate-monitors-with-single-panel'))
) {
windows = windows.filter(function (w) {
return w.get_monitor() == monitor.index
diff --git a/src/panelManager.js b/src/panelManager.js
index 5fce29c..a9ea41f 100755
--- a/src/panelManager.js
+++ b/src/panelManager.js
@@ -495,7 +495,9 @@ export const PanelManager = class {
}
let isolateWorkspaces = SETTINGS.get_boolean('isolate-workspaces')
- let isolateMonitors = SETTINGS.get_boolean('isolate-monitors')
+ let isolateMonitors =
+ !SETTINGS.get_boolean('multi-monitors') ||
+ SETTINGS.get_boolean('isolate-monitors')
this.focusedApp = app
diff --git a/src/prefs.js b/src/prefs.js
index 27c86a1..cf70345 100644
--- a/src/prefs.js
+++ b/src/prefs.js
@@ -184,6 +184,7 @@ const Preferences = class {
this._builder.add_from_file(
this._path + '/ui/BoxIsolateWorkspacesOptions.ui',
)
+ this._builder.add_from_file(this._path + '/ui/BoxIsolateMonitorsOptions.ui')
// pages
this._builder.add_from_file(this._path + '/ui/SettingsPosition.ui')
@@ -2608,6 +2609,37 @@ const Preferences = class {
Gio.SettingsBindFlags.DEFAULT,
)
+ this._settings.bind(
+ 'isolate-monitors-with-single-panel',
+ this._builder.get_object('isolate_monitors_with_single_panel_switch'),
+ 'active',
+ Gio.SettingsBindFlags.DEFAULT,
+ )
+
+ this._builder
+ .get_object('isolate_monitors_button')
+ .connect('clicked', () => {
+ let scrolledWindow = this._builder.get_object(
+ 'box_isolate_monitors_options',
+ )
+
+ let dialog = this._createPreferencesDialog(
+ _('Isolate monitors options'),
+ scrolledWindow,
+ () => {
+ // restore default settings
+ this._settings.set_value(
+ 'isolate-monitors-with-single-panel',
+ this._settings.get_default_value(
+ 'isolate-monitors-with-single-panel',
+ ),
+ )
+ },
+ )
+
+ dialog.show()
+ })
+
this._settings.bind(
'overview-click-to-exit',
this._builder.get_object('clicktoexit_switch'),
diff --git a/ui/BoxIsolateMonitorsOptions.ui b/ui/BoxIsolateMonitorsOptions.ui
new file mode 100644
index 0000000..8c37cc9
--- /dev/null
+++ b/ui/BoxIsolateMonitorsOptions.ui
@@ -0,0 +1,34 @@
+
+
+
+
+
+
diff --git a/ui/SettingsBehavior.ui b/ui/SettingsBehavior.ui
index bba198e..569da49 100644
--- a/ui/SettingsBehavior.ui
+++ b/ui/SettingsBehavior.ui
@@ -145,6 +145,20 @@
Isolate monitors
+
+
+ True
+ center
+
+
+ emblem-system-symbolic
+
+
+
+
+
center