Introduction
Introduction Statistics Contact Development Disclaimer Help
tresize handles offscreen issues - dwm - [fork] customized build of dwm, the dy…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit e0f039789643381485dab5c467f66db5162d4f63
parent ca3e847e459e1ba43f45513877d39d50cce7a0c5
Author: Anselm R Garbe <[email protected]>
Date: Wed, 20 Feb 2008 08:13:41 +0000
resize handles offscreen issues
Diffstat:
M dwm.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -1263,9 +1263,10 @@ reapply(const char *arg) {
void
resize(Client *c, int x, int y, int w, int h, Bool sizehints) {
+ Monitor *m;
XWindowChanges wc;
- //Monitor scr = monitors[monitorat()];
-// c->monitor = monitorat();
+
+ m = &monitors[c->monitor];
if(sizehints) {
/* set minimum possible */
t@@ -1307,17 +1308,14 @@ resize(Client *c, int x, int y, int w, int h, Bool siz…
}
if(w <= 0 || h <= 0)
return;
- /* TODO: offscreen appearance fixes */
- /*
- if(x > scr.sw)
- x = scr.sw - w - 2 * c->border;
- if(y > scr.sh)
- y = scr.sh - h - 2 * c->border;
- if(x + w + 2 * c->border < scr.sx)
- x = scr.sx;
- if(y + h + 2 * c->border < scr.sy)
- y = scr.sy;
- */
+ if(x > m->sw)
+ x = m->sw - w - 2 * c->border;
+ if(y > m->sh)
+ y = m->sh - h - 2 * c->border;
+ if(x + w + 2 * c->border < m->sx)
+ x = m->sx;
+ if(y + h + 2 * c->border < m->sy)
+ y = m->sy;
if(c->x != x || c->y != y || c->w != w || c->h != h) {
c->x = wc.x = x;
c->y = wc.y = y;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.