summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-09 16:07:32 +0100
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-09 16:07:32 +0100
commitf3bc367dea26234929fe4ea5e37133b7f5d37cc8 (patch)
treea30abdb27b26aca8e394e405b189542de3153497 /dwm.c
parent24012d1c6a5620b0cb8d2f76dcf72996f67747d8 (diff)
steam patch, fix bf2
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/dwm.c b/dwm.c
index 2aed752..43adc34 100644
--- a/dwm.c
+++ b/dwm.c
@@ -96,6 +96,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;
@@ -297,6 +298,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))
@@ -627,13 +631,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;
@@ -1256,7 +1262,7 @@ resizeclient(Client *c, int x, int y, int w, int h)
if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
|| &monocle == c->mon->lt[c->mon->sellt]->arrange)
&& !c->isfullscreen && !c->isfloating
- && NULL != c->mon->lt[c->mon->sellt]->arrange) {
+ && NULL != c->mon->lt[c->mon->sellt]->arrange) {
c->w = wc.width += c->bw * 2;
c->h = wc.height += c->bw * 2;
wc.border_width = 0;
@@ -1438,6 +1444,8 @@ setfocus(Client *c)
XA_WINDOW, 32, PropModeReplace,
(unsigned char *) &(c->win), 1);
}
+ if (c->issteam)
+ setclientstate(c, NormalState);
sendevent(c, wmatom[WMTakeFocus]);
}