mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Close preview when entering fullscreen
This commit is contained in:
@@ -133,6 +133,15 @@ var PreviewMenu = Utils.defineClass({
|
||||
'style-changed',
|
||||
() => this._updateClip()
|
||||
],
|
||||
[
|
||||
global.display,
|
||||
'in-fullscreen-changed',
|
||||
() => {
|
||||
if (global.display.focus_window && global.display.focus_window.is_fullscreen()) {
|
||||
this.close(true);
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
Me.settings,
|
||||
[
|
||||
@@ -269,6 +278,10 @@ var PreviewMenu = Utils.defineClass({
|
||||
}
|
||||
},
|
||||
|
||||
getCurrentAppIcon: function() {
|
||||
return this.currentAppIcon;
|
||||
},
|
||||
|
||||
_setReactive: function(reactive) {
|
||||
this._box.get_children().forEach(c => c.reactive = reactive);
|
||||
this.menu.reactive = reactive;
|
||||
@@ -279,6 +292,14 @@ var PreviewMenu = Utils.defineClass({
|
||||
this.emit('open-state-changed');
|
||||
},
|
||||
|
||||
_resetHiddenState: function() {
|
||||
this.menu.hide();
|
||||
this._setOpenedState(false);
|
||||
this.menu.opacity = 0;
|
||||
this.menu[this._translationProp] = this._translationOffset;
|
||||
this._box.get_children().forEach(c => c.destroy());
|
||||
},
|
||||
|
||||
_removeFocus: function() {
|
||||
if (this._focusedPreview) {
|
||||
this._focusedPreview.setFocus(false);
|
||||
@@ -336,10 +357,6 @@ var PreviewMenu = Utils.defineClass({
|
||||
preview.assignWindow(window, this.opened);
|
||||
},
|
||||
|
||||
getCurrentAppIcon: function() {
|
||||
return this.currentAppIcon;
|
||||
},
|
||||
|
||||
_addCloseTimeout: function() {
|
||||
this._timeoutsHandler.add([T2, Me.settings.get_int('leave-timeout'), () => this.close()]);
|
||||
},
|
||||
@@ -406,14 +423,6 @@ var PreviewMenu = Utils.defineClass({
|
||||
}
|
||||
},
|
||||
|
||||
_resetHiddenState: function() {
|
||||
this.menu.hide();
|
||||
this._setOpenedState(false);
|
||||
this.menu.opacity = 0;
|
||||
this.menu[this._translationProp] = this._translationOffset;
|
||||
this._box.get_children().forEach(c => c.destroy());
|
||||
},
|
||||
|
||||
_updateClip: function() {
|
||||
let x, y, w, h;
|
||||
let geom = this.panel.getGeometry();
|
||||
|
||||
Reference in New Issue
Block a user