Skip to content

Instantly share code, notes, and snippets.

@glabra
Created August 13, 2017 09:21
Show Gist options
  • Save glabra/e56b19339fb7899f63feb85643b1c00c to your computer and use it in GitHub Desktop.
Save glabra/e56b19339fb7899f63feb85643b1c00c to your computer and use it in GitHub Desktop.
dwm-6.1にsizehintを無視するようなRuleを追加する
diff -aur dwm-6.1.pristine/dwm.c dwm-6.1.new/dwm.c
--- dwm-6.1.pristine/dwm.c 2017-07-23 17:20:36.760343947 +0900
+++ dwm-6.1.new/dwm.c 2017-07-23 17:20:49.437010900 +0900
@@ -92,7 +92,7 @@
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
+ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, ignoreresizehints;
Client *next;
Client *snext;
Monitor *mon;
@@ -139,6 +139,7 @@
unsigned int tags;
int isfloating;
int monitor;
+ int ignoreresizehints;
} Rule;
/* function declarations */
@@ -298,6 +299,7 @@
{
c->isfloating = r->isfloating;
c->tags |= r->tags;
+ c->ignoreresizehints = r->ignoreresizehints;
for (m = mons; m && m->num != r->monitor; m = m->next);
if (m)
c->mon = m;
@@ -342,7 +344,7 @@
*h = bh;
if (*w < bh)
*w = bh;
- if (resizehints || c->isfloating || !c->mon->lt[c->mon->sellt]->arrange) {
+ if (!c->ignoreresizehints && (resizehints || c->isfloating || !c->mon->lt[c->mon->sellt]->arrange)) {
/* see last two sentences in ICCCM 4.1.2.3 */
baseismin = c->basew == c->minw && c->baseh == c->minh;
if (!baseismin) { /* temporarily remove base dimensions */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment