From 9d11cd7d1860b5e228992fa4626df014af48a05f Mon Sep 17 00:00:00 2001 From: Wilfried SUGNIAUX Date: Thu, 3 Dec 2020 22:56:37 +0100 Subject: [PATCH] DWM 6.2: -Making a Workaround patch for WebStorm: do not care about property notification saying that a second window is transient to the first webstorm window (cherry picked from commit f47c3c83257eed490c6aaf876fbb67b2ddb8b62c) --- config.h | 18 +++++++++--------- dwm.c | 10 ++++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/config.h b/config.h index 013ade9..f102456 100644 --- a/config.h +++ b/config.h @@ -47,16 +47,16 @@ static const Rule rules[] = { * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ - /* class instance title tags mask isfloating isterminal noswallow monitor */ + /* class instance title tags mask isfloating isterminal noswallow ignoretransient monitor */ - {"jetbrains-studio", NULL, NULL, 0, 1, 0, 0, -1 }, - {"st", NULL, NULL, 0, 0, 1, 1, -1}, - {"Xephyr", NULL, NULL, 0, 1, 0, 0, -1}, - {"Xnest", NULL, NULL, 0, 1, 0, 0, -1}, - {"streamdeck", NULL, NULL, 0, 0, 0, 1, -1}, - {"jetbrains-toolbox", NULL, NULL, 0, 1, 0, 1, -1}, - {"jetbrains-idea", NULL, NULL, 0, 0, 0, 1, -1}, - {"jetbrains-idea", NULL, "Welcome to IntelliJ IDEA", 0, 1, 0, 1, -1}, + {"jetbrains-studio", NULL, NULL, 0, 1, 0, 0, 0, -1 }, + {"st", NULL, NULL, 0, 0, 1, 1, 0, -1}, + {"Xephyr", NULL, NULL, 0, 1, 0, 0, 0, -1}, + {"Xnest", NULL, NULL, 0, 1, 0, 0, 0, -1}, + {"streamdeck", NULL, NULL, 0, 0, 0, 1, 0, -1}, + {"jetbrains-toolbox", NULL, NULL, 0, 1, 0, 1, 0, -1}, + {"jetbrains-idea", NULL, NULL, 0, 0, 0, 1, 1, -1}, + {"jetbrains-idea", NULL, "Welcome to IntelliJ IDEA", 0, 1, 0, 1, 0, -1}, }; /* layout(s) */ diff --git a/dwm.c b/dwm.c index 674fd36..29419d2 100644 --- a/dwm.c +++ b/dwm.c @@ -113,7 +113,7 @@ struct Client { int basew, baseh, incw, inch, maxw, maxh, minw, minh; int bw, oldbw; unsigned int tags; - int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow; + int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, ignoretransient; pid_t pid; Client *next; Client *snext; @@ -164,6 +164,7 @@ typedef struct { int isfloating; int isterminal; int noswallow; + int ignoretransient; int monitor; } Rule; @@ -354,6 +355,7 @@ applyrules(Client *c) { c->isterminal = r->isterminal; c->isfloating = r->isfloating; + c->ignoretransient = r->ignoretransient; c->tags |= r->tags; for (m = mons; m && m->num != r->monitor; m = m->next); if (m) @@ -1453,9 +1455,9 @@ propertynotify(XEvent *e) switch(ev->atom) { default: break; case XA_WM_TRANSIENT_FOR: - if (!c->isfloating && (XGetTransientForHint(dpy, c->win, &trans)) && - (c->isfloating = (wintoclient(trans)) != NULL)) - arrange(c->mon); + if (!c->ignoretransient && !c->isfloating && (XGetTransientForHint(dpy, c->win, &trans)) && + (c->isfloating = (wintoclient(trans)) != NULL)) + arrange(c->mon); break; case XA_WM_NORMAL_HINTS: updatesizehints(c);