add steam patch
This commit is contained in:
22
dwm.c
22
dwm.c
@@ -112,6 +112,7 @@ struct Client {
|
||||
int bw, oldbw;
|
||||
unsigned int tags;
|
||||
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
|
||||
int issteam;
|
||||
int fakefullscreen;
|
||||
Client *next;
|
||||
Client *snext;
|
||||
@@ -389,6 +390,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))
|
||||
@@ -764,13 +768,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;
|
||||
@@ -1975,6 +1981,8 @@ setfocus(Client *c)
|
||||
XA_WINDOW, 32, PropModeReplace,
|
||||
(unsigned char *) &(c->win), 1);
|
||||
}
|
||||
if (c->issteam)
|
||||
setclientstate(c, NormalState);
|
||||
|
||||
sendevent(c->win, wmatom[WMTakeFocus], NoEventMask, wmatom[WMTakeFocus], CurrentTime, 0, 0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user