Repository navigation
island: control the brightness devices pinned to its own screen - #4092
Conversation
|
/claude review |
| return 0; | ||
| } | ||
| readonly property var brightnessDevice: BrightnessService.getCurrentDeviceInfo() | ||
| readonly property string brightnessDeviceId: BrightnessService.screenLeadDevice(controller.screen) |
There was a problem hiding this comment.
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 reviewOne behavior issue with pinned devices on multiple screens. The rest looks correct.
|
|
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 |
|
/claude review |
Claude reviewNo issues found. |
(cherry picked from commit 7bc70be)
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
Related issues
Fixes #3918
Checklist
make lint-qmlwith no new warningsI checked this with
make test-qml, a new test for the service functions, and a local qmltestrunner setup that ran the realIslandSystemSourcewith 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.