Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
offscreen client appearance fixes
[dwm.git]
/
client.c
diff --git
a/client.c
b/client.c
index
dce06e9
..
33b3c56
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-281,6
+281,16
@@
resize(Client *c, Bool sizehints, Corner sticky) {
if(sticky == BotLeft || sticky == BotRight)
c->y = bottom - c->h;
if(sticky == BotLeft || sticky == BotRight)
c->y = bottom - c->h;
+ /* offscreen appearance fixes */
+ if(c->x + c->w < 0)
+ c->x = 0;
+ if(c->y + c->h < bh)
+ c->y = bh;
+ if(c->x > sw)
+ c->x = sw - c->w;
+ if(c->y > sh)
+ c->y = sh - c->h;
+
resizetitle(c);
wc.x = c->x;
wc.y = c->y;
resizetitle(c);
wc.x = c->x;
wc.y = c->y;