mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
Adding steam patch
This commit is contained in:
parent
1dd4ec5bc4
commit
14e148be2a
@ -15,7 +15,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
2020-08-10 - Added cool autostart and insets patches
|
2020-08-10 - Added cool autostart, insets and steam patches
|
||||||
|
|
||||||
2020-08-02 - Added reorganizetags patch
|
2020-08-02 - Added reorganizetags patch
|
||||||
|
|
||||||
@ -446,6 +446,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
|||||||
- [statuspadding](https://dwm.suckless.org/patches/statuspadding/)
|
- [statuspadding](https://dwm.suckless.org/patches/statuspadding/)
|
||||||
- adds configuration options for horizontal and vertical padding in the status bar
|
- adds configuration options for horizontal and vertical padding in the status bar
|
||||||
|
|
||||||
|
- [steam](https://github.com/bakkeby/patches/wiki/steam)
|
||||||
|
- a minor patch that works around the issue of floating Steam windows jumping around the screen when they receive focus
|
||||||
|
|
||||||
- [sticky](https://dwm.suckless.org/patches/sticky/)
|
- [sticky](https://dwm.suckless.org/patches/sticky/)
|
||||||
- adds toggleable keyboard shortcut to make a client 'sticky', i.e. visible on all tags
|
- adds toggleable keyboard shortcut to make a client 'sticky', i.e. visible on all tags
|
||||||
|
|
||||||
|
21
dwm.c
21
dwm.c
@ -294,6 +294,9 @@ struct Client {
|
|||||||
int isterminal, noswallow;
|
int isterminal, noswallow;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
#endif // SWALLOW_PATCH
|
#endif // SWALLOW_PATCH
|
||||||
|
#if STEAM_PATCH
|
||||||
|
int issteam;
|
||||||
|
#endif // STEAM_PATCH
|
||||||
#if STICKY_PATCH
|
#if STICKY_PATCH
|
||||||
int issticky;
|
int issticky;
|
||||||
#endif // STICKY_PATCH
|
#endif // STICKY_PATCH
|
||||||
@ -685,6 +688,11 @@ applyrules(Client *c)
|
|||||||
gettextprop(c->win, wmatom[WMWindowRole], role, sizeof(role));
|
gettextprop(c->win, wmatom[WMWindowRole], role, sizeof(role));
|
||||||
#endif // WINDOWROLERULE_PATCH
|
#endif // WINDOWROLERULE_PATCH
|
||||||
|
|
||||||
|
#if STEAM_PATCH
|
||||||
|
if (strstr(class, "Steam") || strstr(class, "steam_app_"))
|
||||||
|
c->issteam = 1;
|
||||||
|
#endif // STEAM_PATCH
|
||||||
|
|
||||||
for (i = 0; i < LENGTH(rules); i++) {
|
for (i = 0; i < LENGTH(rules); i++) {
|
||||||
r = &rules[i];
|
r = &rules[i];
|
||||||
if ((!r->title || strstr(c->name, r->title))
|
if ((!r->title || strstr(c->name, r->title))
|
||||||
@ -1198,6 +1206,18 @@ configurerequest(XEvent *e)
|
|||||||
c->bw = ev->border_width;
|
c->bw = ev->border_width;
|
||||||
else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
|
else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
|
||||||
m = c->mon;
|
m = c->mon;
|
||||||
|
#if STEAM_PATCH
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (ev->value_mask & CWX) {
|
if (ev->value_mask & CWX) {
|
||||||
c->oldx = c->x;
|
c->oldx = c->x;
|
||||||
c->x = m->mx + ev->x;
|
c->x = m->mx + ev->x;
|
||||||
@ -1206,6 +1226,7 @@ configurerequest(XEvent *e)
|
|||||||
c->oldy = c->y;
|
c->oldy = c->y;
|
||||||
c->y = m->my + ev->y;
|
c->y = m->my + ev->y;
|
||||||
}
|
}
|
||||||
|
#endif // STEAM_PATCH
|
||||||
if (ev->value_mask & CWWidth) {
|
if (ev->value_mask & CWWidth) {
|
||||||
c->oldw = c->w;
|
c->oldw = c->w;
|
||||||
c->w = ev->width;
|
c->w = ev->width;
|
||||||
|
@ -717,6 +717,17 @@
|
|||||||
*/
|
*/
|
||||||
#define STACKER_PATCH 0
|
#define STACKER_PATCH 0
|
||||||
|
|
||||||
|
/* Steam, and steam windows (games), trigger a ConfigureNotify request every time the window
|
||||||
|
* gets focus. More so, the configure event passed along from Steam tends to have the wrong
|
||||||
|
* x and y co-ordinates which can make the window, if floating, jump around the screen.
|
||||||
|
*
|
||||||
|
* This patch works around this age-old issue by ignoring the x and y co-ordinates for
|
||||||
|
* ConfigureNotify requests relating to Steam windows.
|
||||||
|
*
|
||||||
|
* https://github.com/bakkeby/patches/wiki/steam
|
||||||
|
*/
|
||||||
|
#define STEAM_PATCH 0
|
||||||
|
|
||||||
/* Adds toggleable keyboard shortcut to make a client 'sticky', i.e. visible on all tags.
|
/* Adds toggleable keyboard shortcut to make a client 'sticky', i.e. visible on all tags.
|
||||||
* https://dwm.suckless.org/patches/sticky/
|
* https://dwm.suckless.org/patches/sticky/
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user