blob: 84591f0dbc1f67480728f8779644e0b77bd57846 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# pointerlock
## Description
This patch keeps focus on a fullscreen client when the mouse pointer crosses
a monitor edge. It applies to dwm 6.8.
By default, `enternotify()` and `motionnotify()` change the selected monitor
and focus whenever the pointer moves onto another monitor, so a fullscreen
game loses focus from mouse movement alone. With this patch both handlers
return early while a fullscreen client is selected. Keyboard focus changes,
tag switching and `focusmon` still work.
## Configuration
The patch uses the existing `lockfullscreen` option in `config.h`. Set it to
0 to disable the behaviour. No new options are added.
## Testing
Applies and builds against dwm 6.8. Runtime tested under Xvfb with two distinct
640x800 Xinerama heads supplied by a test shim. Pointer crossing kept input
focus on the fullscreen client, while `focusmon` still changed monitors.
Setting `lockfullscreen` to 0 restored the original pointer-focus behaviour.
## Download
* [dwm-pointerlock-6.8.diff](dwm-pointerlock-6.8.diff)
## Author
* Daniel Guihot - [daniel@guihot.net](mailto:daniel@guihot.net)
|