Skip to content

Commit

Permalink
fix: how the indicator orders the monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
domferr committed Jul 14, 2024
1 parent 12e2262 commit 4dbc077
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/indicator/defaultMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ export default class DefaultMenu implements CurrentMenu {

const selectedIdPerMonitor = Settings.get_selected_layouts();
const monitors = getMonitors();
this._layoutsRows = monitors.map((monitor, index) => {
const selectedId = selectedIdPerMonitor[index];
this._layoutsRows = monitors.map((monitor) => {
const selectedId = selectedIdPerMonitor[monitor.index];
const row = new LayoutsRow(
this._container,
layouts,
Expand All @@ -327,7 +327,10 @@ export default class DefaultMenu implements CurrentMenu {
row.connect(
'selected-layout',
(r: LayoutsRow, layoutId: string) => {
this._indicator.selectLayoutOnClick(index, layoutId);
this._indicator.selectLayoutOnClick(
monitor.index,
layoutId,
);
},
);
return row;
Expand Down

0 comments on commit 4dbc077

Please sign in to comment.