Skip to content

Commit

Permalink
Correctly return from GLib idle/timeout calls
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed Jul 11, 2019
1 parent 12c6bea commit 1182728
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function enable() {
module.enable();
});
});
return GLib.SOURCE_REMOVE;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ var VerticalisePanelSubModule = class VerticalisePanelSubModule {
// 1- Set all List container to vertical
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this.recursivelySetVertical(this.panel, true);
return GLib.SOURCE_REMOVE;
});

// 2- Override the allocate function of the panel to display the PanelBoxes vertically
Expand Down
1 change: 1 addition & 0 deletions module/noTitleBarModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var NoTitleBarModule = class NoTitleBarModule {
if (!this._handleWindow(window)) return;
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this.toggleTitleBar(this.getWindowXID(window), true);
return GLib.SOURCE_REMOVE;
});
});
}
Expand Down
3 changes: 2 additions & 1 deletion superWorkspace/superWorkspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,10 @@ var SuperWorkspace = class SuperWorkspace {
this.emitInProgress = false;

if (this.destroyed) {
return;
return GLib.SOURCE_REMOVE;
}
this.emit('windows-changed');
return GLib.SOURCE_REMOVE;
});
}

Expand Down
1 change: 1 addition & 0 deletions tilingManager/tilingLayouts/baseTilingLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ var BaseTilingLayout = class BaseTilingLayout {
//If we don't have actor we hope to get it in the next loop
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this.callSafely(metaWindow, callback, true);
return GLib.SOURCE_REMOVE;
});
} else {
// Can't do shit for now
Expand Down
2 changes: 2 additions & 0 deletions tilingManager/tilingManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var TilingManager = class TilingManager {
}
}
);
return GLib.SOURCE_REMOVE;
});
}
});
Expand Down Expand Up @@ -119,6 +120,7 @@ var TilingManager = class TilingManager {
}
log('tile windows end');
this.tilingInProgress = false;
return GLib.SOURCE_REMOVE;
});
}
};
1 change: 1 addition & 0 deletions widget/backdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var Backdrop = GObject.registerClass(
this.window,
this
);
return GLib.SOURCE_REMOVE;
});
} else {
this.followWindow();
Expand Down
1 change: 1 addition & 0 deletions widget/taskBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var TaskBar = GObject.registerClass(
this.updateItems();
GLib.timeout_add(GLib.PRIORITY_DEFAULT, 50, () => {
this._animateActiveIndicator();
return GLib.SOURCE_REMOVE;
});
});

Expand Down

0 comments on commit 1182728

Please sign in to comment.