From 916c1cf0b8bdc115878cd972af5bed6ea92b73cd Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 21 Jan 2008 23:25:30 -0500 Subject: [PATCH] Shortcircuit frame_resize for fullscreen clients. --- cmd/wmii/frame.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/cmd/wmii/frame.c b/cmd/wmii/frame.c index 407d1eee..022ae7bf 100644 --- a/cmd/wmii/frame.c +++ b/cmd/wmii/frame.c @@ -281,11 +281,15 @@ frame_resize(Frame *f, Rectangle r) { int collapsed; c = f->client; - stickycorner = get_sticky(f->r, r); - f->crect = frame_hints(f, r, stickycorner); - if(c->fullscreen) + if(c->fullscreen) { f->crect = screen->r; + f->r = screen->r; + return; + } + + stickycorner = get_sticky(f->r, r); + f->crect = frame_hints(f, r, stickycorner); if(Dx(r) <= 0 || Dy(r) <= 0) fprint(2, "Badness: Frame rect: %R\n", r); @@ -326,15 +330,8 @@ frame_resize(Frame *f, Rectangle r) { if(!f->client->titleless || !f->area->floating) pt.y += labelh(def.font) - 1; - if(f->area->floating) { - if(c->fullscreen) { - f->crect = screen->r; - f->r = frame_client2rect(f, f->crect); - pt.x = (Dx(f->r) - Dx(f->crect)) / 2; - f->r = rectsubpt(f->r, pt); - }else - f->r = constrain(f->r); - } + if(f->area->floating) + f->r = constrain(f->r); pt.x = (Dx(f->r) - Dx(f->crect)) / 2; f->crect = rectaddpt(f->crect, pt); }