mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
can_open_new_window already checks for new-window action
This commit is contained in:
@@ -1004,18 +1004,11 @@ var TaskbarAppIcon = GObject.registerClass({
|
||||
|
||||
_launchNewInstance() {
|
||||
if (this.app.can_open_new_window() && this.app.state == Shell.AppState.RUNNING) {
|
||||
let appActions = this.app.get_app_info().list_actions();
|
||||
let newWindowIndex = appActions.indexOf('new-window');
|
||||
|
||||
if(Me.settings.get_boolean('animate-window-launch')) {
|
||||
this.animateLaunch();
|
||||
}
|
||||
|
||||
if (newWindowIndex < 0) {
|
||||
this.app.open_new_window(-1);
|
||||
} else {
|
||||
this.app.launch_action(appActions[newWindowIndex], global.get_current_time(), -1);
|
||||
}
|
||||
this.app.open_new_window(-1);
|
||||
} else {
|
||||
let windows = this.window ? [this.window] : this.app.get_windows();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user