Comment 14 for bug 1080283

Revision history for this message
Mike Ellertson (mdellertson) wrote :

I thought I'd chime in with some additional info, well at least I think it's additional.

I'm running three monitors with resolutions as follows:

Monitor 1: 1680 x 1050 (left monitor)
Monitor 2: 1920 x 1080 (center monitor)
Monitor 3: 1680 x 1050 (right monitor)

Attempting to understand the possible root cause, I ran the following two test cases. For both test cases I have the same action assigned for each of the four hot-corners, namely 'Spread all Windows'.

1) Align the top edges of all three monitors, and move mouse to:
1.a. top right of right monitor
1.b. bottom right of right monitor
1.c. top left of left monitor
1.d. bottom left of left monitor

2) Align bottom edges of all three monitors, and move mouse to:
2.a. top right of right monitor
2.b. bottom right of right monitor
2.c. top left of left monitor
2.d. bottom left of left monitor

The 'Spread all Windows' action is triggered only for 1.a, 1,c, 2.b and 2.d.

The center monitor on my configuration has a slightly greater Y axis resolution than the left and right monitors, 1080 vs 1080 respectively. It seems to me like the issue might be caused, directly or indirectly, by hit detection for the hot-corner function only returning true using the following logic (actually I imagine the function isn't boolean, but I'm just using this as an example):

If mouse X value >= max X screen resolution value evaluate the two following statements:
Return true for bottom right corner if mouse Y value >= max Y screen resolution value
Return true for top right corner if mouse Y value <= min Y screen resolution value

If mouse X value <= min X screen resolution value evaluate the two following statements:
Return true for bottom left corner if mouse Y value >= max Y screen resolution value
Return true for top left corner if mouse Y value <= min Y screen resolution value

It seems like the issue might stem from the min and max Y variables being set using the min and max Y of all monitors. But, it seems like it might be better to set min and max Y value on a per monitor basis. That way the hot-corner hit detection logic could check to see if the mouse is on the right most or left most monitor and use its min and max Y values when evaluating corner hit detection.

There are a few ways I can imagine the framework being structured, which might make fixing this issue a bit more challenging. But, as I have no exposure to the Unity framework, I'm just guessing. :-)

I hope this helps, and on another note, I've been looking for a way to give back to the linux community. If I can roll up my sleeves and help out on this issue, I'd be happy to do so. If anyone can point me in the a good direction as a starting point, I'll see if I can help.