Skip to content

island: control the brightness devices pinned to its own screen - #4092

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
Mario-Mohar:fix/island-brightness-pins
Nov 3, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
Mario-Mohar:fix/island-brightness-pins

Conversation

@Mario-Mohar

Copy link
Copy Markdown
Contributor

Description

Each island now reads and sets the brightness devices pinned to its own screen, in both the compact home view and the system level activity. Before, every island used the last IPC device, so scrolling on either screen changed the same monitor. A screen without pins keeps following the last target as before.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Related issues

Fixes #3918

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • QML changes: ran make lint-qml with no new warnings

I checked this with make test-qml, a new test for the service functions, and a local qmltestrunner setup that ran the real IslandSystemSource with three fake screens against a stubbed service. Those checks fail on master and pass here. I did not run it on real monitors with pinned devices, so a check on a multi monitor setup would be welcome.

@github-actions github-actions Bot added fix ui Quickshell UI under quickshell/ labels Nov 2, 2026
@purian23

purian23 commented Nov 2, 2026

Copy link
Copy Markdown
Member

/claude review

return 0;
}
readonly property var brightnessDevice: BrightnessService.getCurrentDeviceInfo()
readonly property string brightnessDeviceId: BrightnessService.screenLeadDevice(controller.screen)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The island now reads its own screen's device, but brightnessConnection.onBrightnessChanged (unchanged, below) still opens the brightness activity on every island for any device change. With pins on two screens, a brightness key on DP-1 pops the DP-2 island too, and it shows DP-2's unchanged level. Before this PR every island at least showed the level that changed.

Fix: in onBrightnessChanged, skip when this screen's targets don't include the device that changed, for example if (!BrightnessService.screenTargets(root.controller.screen).includes(BrightnessService.lastIpcDevice)) return;. Unpinned screens still pass, because their targets come from lastIpcTargets().

@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude review

One behavior issue with pinned devices on multiple screens. The rest looks correct.

  • When brightness changes on one pinned screen, the island on every other pinned screen also opens and shows its own unchanged level, quickshell/Modules/DIsland/IslandSystemSource.qml:37
    Checked: the new BrightnessService screen helpers and their fallback to the last IPC target, the reactivity of the per-screen level bindings, the HomeCompact scroll and IslandSystemSource setRatio targets, null-screen handling, the test, and deprecated shims. Model: claude-opus-5-5.

@Mario-Mohar

Copy link
Copy Markdown
Contributor Author

Fixed in the new commit, the island now only opens on screens whose targets include the device that changed. One limit: the service signal doesn't say which device changed, so this uses lastIpcDevice as suggested. A change from outside the shell, like a hardware key, can still open the wrong island when pins are set. I can pass the device through the signal if you prefer, but that touches more code so I left it out here.

@bbedward

bbedward commented Nov 3, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: the new screenTargetsLastDevice guard in IslandSystemSource.onBrightnessChanged against where lastIpcDevice is set before each brightnessChanged(true) (IPC set/increment/decrement, group sets, island scroll), the fallback to lastIpcTargets() for unpinned screens, null-screen handling, the per-screen level bindings, the HomeCompact and setRatio targets, the tests, and deprecated shims. The known limit with brightness changes from outside the shell, which the author pointed out, is unchanged. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 7bc70be into duxlabs-dev:master Nov 3, 2026
3 checks passed
purian23 pushed a commit that referenced this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Island brightness controls ignore per-monitor device pins

3 participants