Skip to content

Commit

Permalink
refactor: Made a small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
anaximeno committed May 17, 2024
1 parent 59faf0b commit 0659d1f
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,10 @@ class WorkspaceGraph extends WorkspaceButton {
}

update(options = {}) {
const signal = options.signal;
const stateChanged = options.stateChanged;

if ((signal == "position-changed" || signal == "size-changed") &&
this.focusGraph &&
this.focusGraph.metaWindow.has_focus()
if ((stateChanged == "position-changed" || stateChanged == "size-changed") &&
this.focusGraph && this.focusGraph.metaWindow.has_focus()
) {
this.focusGraph.update(options);
} else {
Expand Down Expand Up @@ -634,9 +633,9 @@ class CinnamonWorkspaceSwitcher extends Applet.Applet {
this._onWindowsStateChanged("focus-changed");
}

_onWindowsStateChanged(signal) {
_onWindowsStateChanged(stateChanged) {
let button = this.buttons[global.workspace_manager.get_active_workspace_index()];
button.update({signal: signal});
button.update({stateChanged: stateChanged});
}

on_applet_removed_from_panel() {
Expand Down

0 comments on commit 0659d1f

Please sign in to comment.