Skip to content

Commit

Permalink
[cinnamon-multi-line-taskbar-applet] Register windows on startup (#4294)
Browse files Browse the repository at this point in the history
Add all the windows that currently exists to the taskbar.
This will ensure that the taskbar is not missing windows when
adding the applet to a panel or when cinnamon restarts.
  • Loading branch information
klangman authored Apr 8, 2022
1 parent 67a503b commit 945fcf8
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,18 @@ MyApplet.prototype = {
global.logError(e);
}
},


on_applet_added_to_panel: function() {
let nWorkspaces = global.screen.get_n_workspaces();
for ( let wsIdx=0 ; wsIdx < nWorkspaces ; wsIdx++ ) {
let ws = global.screen.get_workspace_by_index(wsIdx);
let windows = ws.list_windows();
for ( let idx=0 ; idx < windows.length ; idx++ ) {
this._windowAdded(ws, windows[idx]);
}
}
},

on_applet_clicked: function(event) {

},
Expand Down

0 comments on commit 945fcf8

Please sign in to comment.