Place hot corner on primary monitor

This commit is contained in:
Tom Beckmann 2012-07-25 18:17:18 +02:00
parent cc1a374f9a
commit b06c1f37ac
2 changed files with 5 additions and 5 deletions

View File

@ -117,12 +117,11 @@ namespace Gala
ShadowSettings.get_default ().notify.connect (Utils.reload_shadow);
/*hot corner*/
int width, height;
screen.get_size (out width, out height);
var geometry = screen.get_monitor_geometry (screen.get_primary_monitor ());
var hot_corner = new Clutter.Rectangle ();
hot_corner.x = width - 1;
hot_corner.y = height - 1;
hot_corner.x = geometry.x + geometry.width - 1;
hot_corner.y = geometry.y + geometry.height - 1;
hot_corner.width = 1;
hot_corner.height = 1;
hot_corner.opacity = 0;

View File

@ -108,13 +108,14 @@ namespace Gala.Utils
X.Xrectangle rect;
int width, height;
screen.get_size (out width, out height);
var geometry = screen.get_monitor_geometry (screen.get_primary_monitor ());
switch (area) {
case InputArea.FULLSCREEN:
rect = {0, 0, (ushort)width, (ushort)height};
break;
case InputArea.HOT_CORNER: //leave one pix in the bottom left
rect = {(short)(width - 1), (short)(height - 1), 1, 1};
rect = {(short)(geometry.x + geometry.width - 1), (short)(geometry.y + geometry.height - 1), 1, 1};
break;
default:
Util.empty_stage_input_region (screen);