mirror of
https://github.com/elementary/gala.git
synced 2024-12-18 14:51:51 +03:00
Place hot corner on primary monitor
This commit is contained in:
parent
cc1a374f9a
commit
b06c1f37ac
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user