Skip to content

Commit

Permalink
fix window buttons flash when starting apps
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Apr 1, 2018
1 parent c31d54c commit 6ffe18a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion [email protected]/modules/windowButtons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const Main = imports.ui.main;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const Panel = Main.panel;
const AppMenu = Panel.statusArea.appMenu;
const St = imports.gi.St;
Expand Down Expand Up @@ -204,7 +205,9 @@ var WindowButtons = new Lang.Class({
if (this._buttonsActor) {
let valid = Helpers.isValidWindow(this._activeWindow);
let overview = Main.overview.visibleTarget;
let visible = AppMenu._targetApp != null && !overview;
let target = AppMenu._targetApp;
let running = target != null && target.get_state() == Shell.AppState.RUNNING;
let visible = running && !overview;

if (!overview && valid) {
let maximized = Helpers.isMaximized(this._activeWindow, this._enabled);
Expand Down

0 comments on commit 6ffe18a

Please sign in to comment.