aboutsummaryrefslogtreecommitdiffstats
path: root/dwm-deiconify-6.8.diff
blob: 04aed35e894b0f15ef1e1639839c882c1d5eb401 (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
From 456668b4d64e0b3cd79b6d7ffa835a006d9c5941 Mon Sep 17 00:00:00 2001
From: Daniel Guihot <daniel@guihot.net>
Date: Wed, 16 Sep 2026 05:46:17 +1000
Subject: [PATCH] deiconify: restore focused fullscreen clients

Some games leave WM_STATE set to IconicState after losing focus. dwm
can map and focus the window again while the client still considers
itself minimized, leaving a black window. Set NormalState when a
fullscreen client receives focus so it resumes drawing.
---
 dwm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dwm.c b/dwm.c
index 53b393e..505c1f3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1476,6 +1476,8 @@ setfocus(Client *c)
 			XA_WINDOW, 32, PropModeReplace,
 			(unsigned char *) &(c->win), 1);
 	}
+	if (c->isfullscreen)
+		setclientstate(c, NormalState);
 	sendevent(c, wmatom[WMTakeFocus]);
 }
 
-- 
2.55.0