aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 0d60d004f2a2ce2e402dbfa32c39d0798fb7a81d (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
33
34
35
36
37
38
# unmapfullscreen

## Description

This patch hides fullscreen clients by unmapping them instead of moving them
off-screen. It applies to dwm 6.8.

`showhide()` hides a window by moving it to `-2 * width`. Some games and
Wine/Proton builds treat that as a broken or minimized state and do not
recover fullscreen when the tag returns. With this patch a hidden fullscreen
client is unmapped and mapped again when it becomes visible.

dwm selects `StructureNotifyMask` on clients and `SubstructureNotifyMask` on
the root, so calling `XUnmapWindow()` directly reaches `unmapnotify()` and
unmanages the client. The patch adds a small `unmapclient()` helper that
suppresses both masks around the unmap, the same technique the windowmap
patch uses.

Hidden fullscreen clients are not moved off-screen. The client tracks whether
the patch unmapped it, which lets `showhide()` map it before restoring input
focus without querying the X server on every arrange. Normal clients keep
dwm's original off-screen hiding. A hidden client that leaves fullscreen is
mapped off-screen again instead of remaining unmapped.

## Testing

Applies and builds against dwm 6.8. Runtime tested under Xvfb. Hidden
fullscreen clients became unmapped, stayed managed, mapped on return, and
regained real X input focus. Tests also covered a new fullscreen client
assigned to a hidden tag and a hidden client leaving fullscreen.

## Download

* [dwm-unmapfullscreen-6.8.diff](dwm-unmapfullscreen-6.8.diff)

## Author

* Daniel Guihot - [daniel@guihot.net](mailto:daniel@guihot.net)