ckHotspot with multi monitors Thread last updated on 2003-05-10 19:29:13

Posted by member 2112 on 2003-05-09 21:45:19

I had hotspots set like so...
*ckHotspot -1 0 1 1 !VWMRight !none spot1 on
*ckHotspot 0 0 1 1 !VWMLeft !none spot2 on
*ckHotspot 0 -1 1 1 !Popup !none popup on
*ckHotspot -1 -1 1 1 !Screensaver !none spot3 on


This works fine on a single monitor system. But on my dual monitor system where my secondary monitor it to the right of my primary monitor, the right hand side hotspots stop working.

I figured this was due to not being able to handle the negative number in with this setup so I changed it to this...
*ckHotspot $resolutionX-1$ 0 1 1 !VWMRight !none spot1 on
*ckHotspot 0 0 1 1 !VWMLeft !none spot2 on
*ckHotspot 0 -1 1 1 !Popup !none popup on
*ckHotspot $resolutionX-1$ -1 1 1 !Screensaver !none spot3 on


Does anyone see a problem with doing this way?

Posted by member 99 on 2003-05-10 03:36:09 link

It's not that it doesn't handle the negative number, it puts it at the far edge of the desktop, which is on the other monitor.

Using resolutionX should work in the majority of cases.

Posted by member 2112 on 2003-05-10 05:13:49 link

I run my second monitor at a lower resolution so this might explain why I couldn't touch the hot spots.

I tested the second code for when my secondary monitor is on the left and none of the hot spots worked. If what you are saying is correct I can see why.

Posted by member 99 on 2003-05-10 11:28:14 link

The current version of hotspots is completely broken with any monitors in negative space. I have a fixed version which I've just been too lazy to release...

However, hotspot starts the desktop at 0,0, not the primary monitor. If you want it to work with a monitor on the left, use:
MonitorNames pri
allLeft 0
allTop 0
priLeft $0-allLeft$
priTop $0-allTop$
priRight $ResolutionX-allLeft$
priBottom $ResolutionY-allTop$

*ckHotspot $priRight-1$ $priTop$ 1 1 !VWMRight !none spot1 on
*ckHotspot $priLeft$ $priTop$ 1 1 !VWMLeft !none spot2 on
*ckHotspot $priLeft$ $priBottom-1$ 1 1 !Popup !none popup on
*ckHotspot $priRight-1$ $priBottom-1$ 1 1 !Screensaver !none spot3 on

With a regular build of LiteStep, it will use the values you provide in step.rc for $priLeft$, etc., which will work for a single monitor, or 2 or more monitors with none above or to the left of the primary.

With my multimonitor build, it will fill in these values with the edges of the primary monitor and work for everything. (when I stop being lazy and actually release the fixed ckHotspots) If someone wanted to, they could even move them all to a different monitor by changing the MonitorNames line.

Posted by member 2112 on 2003-05-10 19:29:13 link

Thanks a lot for the code. I appreciate it.