diff options
| author | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-03-30 20:02:05 +0100 |
|---|---|---|
| committer | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-03-31 18:31:28 +0100 |
| commit | c72f4fcd509428f3115921ff111cfedadf301df2 (patch) | |
| tree | fff708790f87b49cc8f3b8ab5b538bbb0d924c02 | |
| parent | 276e6c9cb23e82825da678d60e80ab178ce71657 (diff) | |
Fix black screen on steam games when switching tags
| -rw-r--r-- | dwm.c | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -99,6 +99,7 @@ struct Client { int bw, oldbw; unsigned int tags; int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow; + int issteam; pid_t pid; Client *next; Client *snext; @@ -323,6 +324,9 @@ applyrules(Client *c) class = ch.res_class ? ch.res_class : broken; instance = ch.res_name ? ch.res_name : broken; + if (strstr(class, "Steam") || strstr(class, "steam_app_")) + c->issteam = 1; + for (i = 0; i < LENGTH(rules); i++) { r = &rules[i]; if ((!r->title || strstr(c->name, r->title)) @@ -672,13 +676,15 @@ configurerequest(XEvent *e) c->bw = ev->border_width; else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) { m = c->mon; - if (ev->value_mask & CWX) { - c->oldx = c->x; - c->x = m->mx + ev->x; - } - if (ev->value_mask & CWY) { - c->oldy = c->y; - c->y = m->my + ev->y; + if (!c->issteam) { + if (ev->value_mask & CWX) { + c->oldx = c->x; + c->x = m->mx + ev->x; + } + if (ev->value_mask & CWY) { + c->oldy = c->y; + c->y = m->my + ev->y; + } } if (ev->value_mask & CWWidth) { c->oldw = c->w; @@ -1718,6 +1724,8 @@ setfocus(Client *c) XA_WINDOW, 32, PropModeReplace, (unsigned char *) &(c->win), 1); } + if (c->issteam) + setclientstate(c, NormalState); sendevent(c, wmatom[WMTakeFocus]); } |
