diff --git a/Settings.ui b/Settings.ui
index e599d3c..17bc903 100644
--- a/Settings.ui
+++ b/Settings.ui
@@ -2264,35 +2264,6 @@
0
-
-
-
- 0
- 1
-
-
-
-
-
- 1
- 1
-
-
+
+
+
+ 0
+ 1
+
+
+
+
+ True
+ True
+ end
+ center
+ 4
+ 25
+ leave_timeout_adjustment
+ True
+ 25
+
+
+ 1
+ 1
+
+
diff --git a/appIcons.js b/appIcons.js
index e7a6dd3..662cc94 100644
--- a/appIcons.js
+++ b/appIcons.js
@@ -748,7 +748,7 @@ var taskbarAppIcon = Utils.defineClass({
let appCount = this.getAppIconInterestingWindows().length;
let previewedAppIcon = this._previewMenu.getCurrentAppIcon();
- this._previewMenu.close();
+ this._previewMenu.close(this._dtpSettings.get_boolean('window-preview-hide-immediate-click'));
// We check if the app is running, and that the # of windows is > 0 in
// case we use workspace isolation,
diff --git a/prefs.js b/prefs.js
index f7d26c5..4eabbde 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1102,6 +1102,11 @@ const Settings = new Lang.Class({
this._settings.set_int('leave-timeout', widget.get_value());
}));
+ this._settings.bind('window-preview-hide-immediate-click',
+ this._builder.get_object('preview_immediate_click_button'),
+ 'active',
+ Gio.SettingsBindFlags.DEFAULT);
+
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
this._builder.get_object('animation_time_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
this._settings.set_int('window-preview-animation-time', widget.get_value());
@@ -1157,6 +1162,8 @@ const Settings = new Lang.Class({
this._settings.set_value('leave-timeout', this._settings.get_default_value('leave-timeout'));
this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout'));
+ this._settings.set_value('window-preview-hide-immediate-click', this._settings.get_default_value('window-preview-hide-immediate-click'));
+
this._settings.set_value('window-preview-animation-time', this._settings.get_default_value('window-preview-animation-time'));
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
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 0f24b99..5349a9d 100644
--- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
@@ -471,6 +471,11 @@
Aspect ratio Y
The window previews respected aspect ratio Y.
+
+ false
+ Immediate hide on icon click
+ The window previews immediately hide when an application icon is clicked.
+
false
Provide workspace isolation