diff --git a/data/gala.gschema.xml b/data/gala.gschema.xml
index d48f78c6..8acc7197 100644
--- a/data/gala.gschema.xml
+++ b/data/gala.gschema.xml
@@ -7,10 +7,11 @@
-
-
-
-
+
+
+
+
+
@@ -116,6 +117,14 @@
+
+
+ false
+ Whether hotcorners should be enabled when fullscreen window is opened
+
+
+
+
Home']]]>
diff --git a/src/HotCorners/HotCornerManager.vala b/src/HotCorners/HotCornerManager.vala
index b7aed8bd..1013f244 100644
--- a/src/HotCorners/HotCornerManager.vala
+++ b/src/HotCorners/HotCornerManager.vala
@@ -21,11 +21,12 @@ public class Gala.HotCornerManager : Object {
public WindowManager wm { get; construct; }
public GLib.Settings behavior_settings { get; construct; }
+ public GLib.Settings new_behavior_settings { get; construct; }
private GLib.GenericArray hot_corners;
- public HotCornerManager (WindowManager wm, GLib.Settings behavior_settings) {
- Object (wm: wm, behavior_settings: behavior_settings);
+ public HotCornerManager (WindowManager wm, GLib.Settings behavior_settings, GLib.Settings new_behavior_settings) {
+ Object (wm: wm, behavior_settings: behavior_settings, new_behavior_settings: new_behavior_settings);
hot_corners = new GLib.GenericArray ();
behavior_settings.changed.connect (configure);
@@ -71,6 +72,13 @@ public class Gala.HotCornerManager : Object {
var hot_corner = new HotCorner (display, (int) x, (int) y, scale, hot_corner_position);
hot_corner.trigger.connect (() => {
+ if (
+ display.get_monitor_in_fullscreen (display.get_primary_monitor ()) &&
+ !new_behavior_settings.get_boolean ("enable-hotcorners-in-fullscreen")
+ ) {
+ return;
+ }
+
if (action_type == ActionType.CUSTOM_COMMAND) {
run_custom_action (hot_corner_position);
} else {
diff --git a/src/WindowManager.vala b/src/WindowManager.vala
index f6f8f139..a72bf4d9 100644
--- a/src/WindowManager.vala
+++ b/src/WindowManager.vala
@@ -114,6 +114,7 @@ namespace Gala {
private GLib.Settings animations_settings;
private GLib.Settings behavior_settings;
+ private GLib.Settings new_behavior_settings;
private GestureTracker gesture_tracker;
private bool animating_switch_workspace = false;
@@ -142,6 +143,7 @@ namespace Gala {
animations_settings = new GLib.Settings (Config.SCHEMA + ".animations");
animations_settings.bind ("enable-animations", this, "enable-animations", GLib.SettingsBindFlags.GET);
behavior_settings = new GLib.Settings (Config.SCHEMA + ".behavior");
+ new_behavior_settings = new GLib.Settings ("io.elementary.desktop.wm.behavior");
enable_animations = animations_settings.get_boolean ("enable-animations");
}
@@ -295,7 +297,7 @@ namespace Gala {
unowned var monitor_manager = display.get_context ().get_backend ().get_monitor_manager ();
monitor_manager.monitors_changed.connect (on_monitors_changed);
- hot_corner_manager = new HotCornerManager (this, behavior_settings);
+ hot_corner_manager = new HotCornerManager (this, behavior_settings, new_behavior_settings);
hot_corner_manager.on_configured.connect (update_input_area);
hot_corner_manager.configure ();