Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
0a43420
)
applied sanders no_sizehints for tiled mode patch (thx!)
author
[email protected]
<unknown>
Thu, 20 Jul 2006 17:09:11 +0000
(19:09 +0200)
committer
[email protected]
<unknown>
Thu, 20 Jul 2006 17:09:11 +0000
(19:09 +0200)
client.c
diff
|
blob
|
history
dwm.h
diff
|
blob
|
history
diff --git
a/client.c
b/client.c
index
89ca5fb
..
4afa705
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-293,30
+293,30
@@
pop(Client *c)
}
void
}
void
-resize(Client *c, Bool
inc
, Corner sticky)
+resize(Client *c, Bool
sizehints
, Corner sticky)
{
int bottom = c->y + c->h;
int right = c->x + c->w;
XConfigureEvent e;
{
int bottom = c->y + c->h;
int right = c->x + c->w;
XConfigureEvent e;
- if(
inc
) {
+ if(
sizehints
) {
if(c->incw)
c->w -= (c->w - c->basew) % c->incw;
if(c->inch)
c->h -= (c->h - c->baseh) % c->inch;
if(c->incw)
c->w -= (c->w - c->basew) % c->incw;
if(c->inch)
c->h -= (c->h - c->baseh) % c->inch;
+ if(c->minw && c->w < c->minw)
+ c->w = c->minw;
+ if(c->minh && c->h < c->minh)
+ c->h = c->minh;
+ if(c->maxw && c->w > c->maxw)
+ c->w = c->maxw;
+ if(c->maxh && c->h > c->maxh)
+ c->h = c->maxh;
}
if(c->x > sw) /* might happen on restart */
c->x = sw - c->w;
if(c->y > sh)
c->y = sh - c->h;
}
if(c->x > sw) /* might happen on restart */
c->x = sw - c->w;
if(c->y > sh)
c->y = sh - c->h;
- if(c->minw && c->w < c->minw)
- c->w = c->minw;
- if(c->minh && c->h < c->minh)
- c->h = c->minh;
- if(c->maxw && c->w > c->maxw)
- c->w = c->maxw;
- if(c->maxh && c->h > c->maxh)
- c->h = c->maxh;
if(sticky == TopRight || sticky == BotRight)
c->x = right - c->w;
if(sticky == BotLeft || sticky == BotRight)
if(sticky == TopRight || sticky == BotRight)
c->x = right - c->w;
if(sticky == BotLeft || sticky == BotRight)
diff --git
a/dwm.h
b/dwm.h
index
8a7237c
..
1439f59
100644
(file)
--- a/
dwm.h
+++ b/
dwm.h
@@
-106,7
+106,7
@@
extern void killclient(Arg *arg);
extern void lower(Client *c);
extern void manage(Window w, XWindowAttributes *wa);
extern void pop(Client *c);
extern void lower(Client *c);
extern void manage(Window w, XWindowAttributes *wa);
extern void pop(Client *c);
-extern void resize(Client *c, Bool
inc
, Corner sticky);
+extern void resize(Client *c, Bool
sizehints
, Corner sticky);
extern void setsize(Client *c);
extern void settitle(Client *c);
extern void togglemax(Arg *arg);
extern void setsize(Client *c);
extern void settitle(Client *c);
extern void togglemax(Arg *arg);