Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
63b3ab7
)
add screen_hog rule/flag
author
Jason Woofenden
<jason@jasonwoof.com>
Wed, 19 Nov 2014 16:12:40 +0000
(11:12 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Wed, 19 Nov 2014 16:12:40 +0000
(11:12 -0500)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
27c4f92
..
b902b3b
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-91,7
+91,7
@@
struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
- Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
+ Bool isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, screen_hog;
Client *next;
Client *snext;
Monitor *mon;
Client *next;
Client *snext;
Monitor *mon;
@@
-137,6
+137,7
@@
typedef struct {
const char *title;
unsigned int tags;
Bool isfloating;
const char *title;
unsigned int tags;
Bool isfloating;
+ Bool screen_hog;
int monitor;
} Rule;
int monitor;
} Rule;
@@
-299,7
+300,7
@@
applyrules(Client *c) {
XClassHint ch = { NULL, NULL };
/* rule matching */
XClassHint ch = { NULL, NULL };
/* rule matching */
- c->isfloating = c->tags = 0;
+ c->isfloating = c->tags = c->screen_hog = 0;
XGetClassHint(dpy, c->win, &ch);
class = ch.res_class ? ch.res_class : broken;
instance = ch.res_name ? ch.res_name : broken;
XGetClassHint(dpy, c->win, &ch);
class = ch.res_class ? ch.res_class : broken;
instance = ch.res_name ? ch.res_name : broken;
@@
-312,6
+313,7
@@
applyrules(Client *c) {
{
c->isfloating = r->isfloating;
c->tags |= r->tags;
{
c->isfloating = r->isfloating;
c->tags |= r->tags;
+ c->screen_hog = r->screen_hog;
for(m = mons; m && m->num != r->monitor; m = m->next);
if(m)
c->mon = m;
for(m = mons; m && m->num != r->monitor; m = m->next);
if(m)
c->mon = m;
@@
-1686,8
+1688,13
@@
tile(Monitor *m) {
if(n > m->nmaster)
mw = m->nmaster ? m->ww * m->mfact : 0;
if(n > m->nmaster)
mw = m->nmaster ? m->ww * m->mfact : 0;
- else
- mw = m->ww * m->mfact;
+ else {
+ c = nexttiled(m->clients);
+ if (c && !c->screen_hog)
+ mw = m->ww * m->mfact;
+ else
+ mw = m->ww;
+ }
for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if(i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
for(i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if(i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);