1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-21 02:43:32 +01:00

Hot corners feature core

Add mouse pointer position detection to trigger the corner actions.

Screen corners can be assigned an external command to be
executed when the mouse pointer is entering those areas.

In WPrefs, "Hot Corner Shortcut Preferences" can be used
for configuration or by manually adding a "HotCorners" key
and value to "YES" in the ~/GNUstep/Defaults/WindowMaker file.

Actions are specified by the "HotCornerActions" and are defined
as a four entries list ("top left action", "top right action",
"bottom left action", "bottom right action").
A screen corner area is a cube shape defined by the "HotCornerEdge"
which is a number of pixels from 2 (by default) to 10.

To lower the risk of triggering that feature accidentally a
"HotCornerDelay" key can be used which is the time before the action
is triggered while the pointer is in one of the screen corner.
Default value is 250 ms.

Hot Corners feature is disabled by default.
This commit is contained in:
David Maciejak
2023-03-26 14:35:13 +08:00
committed by Carlos R. Mafra
parent 157d1ba85f
commit 802cbc0d75
4 changed files with 143 additions and 12 deletions

View File

@@ -295,6 +295,8 @@ typedef struct _WScreen {
WMHandlerID *autoRaiseTimer;
Window autoRaiseWindow; /* window that is scheduled to be
* raised */
/* for hot-corners delay */
WMHandlerID *hot_corner_timer;
/* for window shortcuts */
WMArray *shortcutWindows[MAX_WINDOW_SHORTCUTS];
@@ -323,6 +325,7 @@ typedef struct _WScreen {
unsigned int doing_alt_tab:1;
unsigned int jump_back_pending:1;
unsigned int ignore_focus_events:1;
unsigned int in_hot_corner:3;
} flags;
} WScreen;