comparison event.c @ 384:126e78129f1d

configurenotify remembers max geom now, and restores this if necessary, however it accepts to touch the max size on configurerequest, this shouldn't break fillscreen apps (tested with mplayer)
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 29 Aug 2006 17:31:55 +0200
parents a9b4077ec058
children 37706ba7d492
comparison
equal deleted inserted replaced
383:2ec9cead84a7 384:126e78129f1d
148 } 148 }
149 149
150 static void 150 static void
151 configurerequest(XEvent *e) 151 configurerequest(XEvent *e)
152 { 152 {
153 int ox, oy, ow, oh;
153 unsigned long newmask; 154 unsigned long newmask;
154 Client *c; 155 Client *c;
155 XConfigureRequestEvent *ev = &e->xconfigurerequest; 156 XConfigureRequestEvent *ev = &e->xconfigurerequest;
156 XEvent synev; 157 XEvent synev;
157 XWindowChanges wc; 158 XWindowChanges wc;
158 159
159 if((c = getclient(ev->window))) { 160 if((c = getclient(ev->window))) {
161 ox = c->x;
162 oy = c->y;
163 ow = c->w;
164 oh = c->h;
160 gravitate(c, True); 165 gravitate(c, True);
161 if(ev->value_mask & CWX) 166 if(ev->value_mask & CWX)
162 c->x = ev->x; 167 c->x = ev->x;
163 if(ev->value_mask & CWY) 168 if(ev->value_mask & CWY)
164 c->y = ev->y; 169 c->y = ev->y;
189 synev.xconfigure.above = None; 194 synev.xconfigure.above = None;
190 /* Send synthetic ConfigureNotify */ 195 /* Send synthetic ConfigureNotify */
191 XSendEvent(dpy, c->win, True, NoEventMask, &synev); 196 XSendEvent(dpy, c->win, True, NoEventMask, &synev);
192 } 197 }
193 XSync(dpy, False); 198 XSync(dpy, False);
194 if(c->isfloat) 199 if(c->isfloat || c->ismax) {
195 resize(c, False, TopLeft); 200 resize(c, False, TopLeft);
201 c->x = ox;
202 c->y = oy;
203 c->w = ow;
204 c->h = oh;
205 }
196 else 206 else
197 arrange(NULL); 207 arrange(NULL);
198 } 208 }
199 else { 209 else {
200 wc.x = ev->x; 210 wc.x = ev->x;