diff --git a/src/InternalUtils.vala b/src/InternalUtils.vala index cd5cc5717..425516ef1 100644 --- a/src/InternalUtils.vala +++ b/src/InternalUtils.vala @@ -27,37 +27,24 @@ namespace Gala { } X.Xrectangle[] rects = {}; - int width, height; - display.get_size (out width, out height); - var geometry = display.get_monitor_geometry (display.get_primary_monitor ()); switch (area) { case InputArea.FULLSCREEN: + int width, height; + display.get_size (out width, out height); + X.Xrectangle rect = {0, 0, (ushort)width, (ushort)height}; rects = {rect}; break; - case InputArea.DEFAULT: - var settings = new GLib.Settings ("io.elementary.desktop.wm.behavior"); - - // if ActionType is NONE make it 0 sized - ushort tl_size = (settings.get_enum ("hotcorner-topleft") != ActionType.NONE ? 1 : 0); - ushort tr_size = (settings.get_enum ("hotcorner-topright") != ActionType.NONE ? 1 : 0); - ushort bl_size = (settings.get_enum ("hotcorner-bottomleft") != ActionType.NONE ? 1 : 0); - ushort br_size = (settings.get_enum ("hotcorner-bottomright") != ActionType.NONE ? 1 : 0); - - X.Xrectangle topleft = {(short)geometry.x, (short)geometry.y, tl_size, tl_size}; - X.Xrectangle topright = {(short)(geometry.x + geometry.width - 1), (short)geometry.y, tr_size, tr_size}; - X.Xrectangle bottomleft = {(short)geometry.x, (short)(geometry.y + geometry.height - 1), bl_size, bl_size}; - X.Xrectangle bottomright = {(short)(geometry.x + geometry.width - 1), (short)(geometry.y + geometry.height - 1), br_size, br_size}; - - rects = {topleft, topright, bottomleft, bottomright}; + case InputArea.DEFAULT: // add plugin's requested areas foreach (var rect in PluginManager.get_default ().get_regions ()) { rects += rect; } break; + case InputArea.NONE: default: #if !HAS_MUTTER44