1 From 2550931c66e10e667ce56a6761cbadd12b331c52 Mon Sep 17 00:00:00 2001
2 From: bakkeby <bakkeby@gmail.com>
3 Date: Mon, 10 Aug 2020 16:45:00 +0200
4 Subject: [PATCH] Steam patch
6 Steam, and steam windows (games), trigger a ConfigureNotify request every time the window
7 gets focus. More so, the configure event passed along from Steam tends to have the wrong
8 x and y coordinates which can make the window, if floating, jump around the screen.
10 This patch works around this age-old issue by ignoring the x and y co-ordinates for
11 ConfigureNotify requests relating to Steam windows.
13 dwm.c | 20 +++++++++++++-------
14 1 file changed, 13 insertions(+), 7 deletions(-)
16 diff --git a/dwm.c b/dwm.c
17 index 4465af1..598d36d 100644
20 @@ -93,6 +93,7 @@ struct Client {
23 int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
28 @@ -291,6 +292,9 @@ applyrules(Client *c)
29 class = ch.res_class ? ch.res_class : broken;
30 instance = ch.res_name ? ch.res_name : broken;
32 + if (strstr(class, "Steam") || strstr(class, "steam_app_"))
35 for (i = 0; i < LENGTH(rules); i++) {
37 if ((!r->title || strstr(c->name, r->title))
38 @@ -588,13 +592,15 @@ configurerequest(XEvent *e)
39 c->bw = ev->border_width;
40 else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
42 - if (ev->value_mask & CWX) {
44 - c->x = m->mx + ev->x;
46 - if (ev->value_mask & CWY) {
48 - c->y = m->my + ev->y;
50 + if (ev->value_mask & CWX) {
52 + c->x = m->mx + ev->x;
54 + if (ev->value_mask & CWY) {
56 + c->y = m->my + ev->y;
59 if (ev->value_mask & CWWidth) {