[hackers] [wmii] Shortcircuit frame_resize for fullscreen clients.

From: Kris Maglione <jg_AT_suckless.org>
Date: Tue Jan 22 05:27:24 2008

changeset: 2252:868fa3e8da2a
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Jan 21 23:25:30 2008 -0500
summary: Shortcircuit frame_resize for fullscreen clients.

diff -r b5da839c0588 -r 868fa3e8da2a cmd/wmii/frame.c
--- a/cmd/wmii/frame.c Mon Jan 21 23:21:37 2008 -0500
+++ b/cmd/wmii/frame.c Mon Jan 21 23:25:30 2008 -0500
@@ -281,11 +281,15 @@ frame_resize(Frame *f, Rectangle r) {
         int collapsed;
 
         c = f->client;
+
+ 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(c->fullscreen)
- f->crect = screen->r;
 
         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);
 }
Received on Tue Jan 22 2008 - 05:27:24 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:07 UTC