Although there is a way to apply the DesktopWorkArea setting to a monitor that
is not the primary one by adding the according offsets you get from calling
(for example) GetMonitorInfo, the approach is neither intuitive nor does it
allow to be applied to multiple monitors.
Therefore, I propose a simple patch that adds support for multiple
DesktopWorkAreas by introducing the new configuration option DesktopWorkAreaX
where X is the logical screen number. The setting expects the rectangle like
the original DesktopWorkArea though it will automatically calculate the right
offset for each monitor.
For the sake of backward compatibility, the DesktopWorkArea setting (which is
now equivalent to DesktopWorkArea0) still works and will set the area for the
first display just as before (given that the rectangle is within the bounds of
the first screen).
Usage example that reserves the left 200 pixel of monitor 0 and the right 200
pixels of monitor 1 where both screens are 1280x1024 with a 40 pixel high
taskbar on monitor 0:
[Rainmeter]
DesktopWorkArea0=200,0,1280,984
DesktopWorkArea1=0,0,1080,1024
On a technical note (maybe for another Issue): The m_OldDesktopWorkAreas
storage might be redundant as the CSystem::GetMultiMonitorInfo().monitors
already hold this particular information. I am not quite sure if/when the
GetMultiMonitorInfo() actually respects the changed DesktopWorkArea. But in the
end it does not harm I suppose.
There might also be (already) some nasty side effects, when the resolution is
changed before RainMeter is quit.
However, my proposed patch should not have any negative (nor positive) effect
on this existing behavior.
Original issue reported on code.google.com by hurrelmann on 29 Jun 2010 at 8:44
Original issue reported on code.google.com by
hurrelmann
on 29 Jun 2010 at 8:44Attachments: