[hackers] [dwm] reversed Andreas Amann's fullscreen fix with the approach proposed by Gary Langshaw: || anselm

From: <hg_AT_suckless.org>
Date: Sat, 23 Jun 2012 09:05:27 +0200 (CEST)

changeset: 1601:f6eed5b57ff3
tag: tip
user: anselm_AT_garbe.us
date: Sat Jun 23 09:06:00 2012 +0200
files: dwm.c
description:
reversed Andreas Amann's fullscreen fix with the approach proposed by Gary Langshaw:
- idea is not supporting movemouse/resizemouse/togglefloating for fullscreen windows
- as fullscreen windows are broken anyways, they should only be adjusted by their own means


diff -r 48309b14abb9 -r f6eed5b57ff3 dwm.c
--- a/dwm.c Sun Apr 15 11:41:18 2012 +0200
+++ b/dwm.c Sat Jun 23 09:06:00 2012 +0200
_AT_@ -575,8 +575,9 @@
         XConfigureEvent *ev = &e->xconfigure;
         Bool dirty;
 
+ // TODO: updategeom handling sucks, needs to be simplified
         if(ev->window == root) {
- dirty = (sw != ev->width);
+ dirty = (sw != ev->width || sh != ev->height);
                 sw = ev->width;
                 sh = ev->height;
                 if(updategeom() || dirty) {
_AT_@ -1235,6 +1236,8 @@
 
         if(!(c = selmon->sel))
                 return;
+ if(c->isfullscreen) /* no support moving fullscreen windows by mouse */
+ return;
         restack(selmon);
         ocx = c->x;
         ocy = c->y;
_AT_@ -1268,11 +1271,8 @@
                                 && (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
                                         togglefloating(NULL);
                         }
- if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) {
- if(c->isfullscreen)
- setfullscreen(c, False);
+ if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
                                 resize(c, nx, ny, c->w, c->h, True);
- }
                         break;
                 }
         } while(ev.type != ButtonRelease);
_AT_@ -1382,6 +1382,8 @@
 
         if(!(c = selmon->sel))
                 return;
+ if(c->isfullscreen) /* no support resizing fullscreen windows by mouse */
+ return;
         restack(selmon);
         ocx = c->x;
         ocy = c->y;
_AT_@ -1407,11 +1409,8 @@
                                 && (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
                                         togglefloating(NULL);
                         }
- if(!selmon->lt[selmon->sellt]->arrange || c->isfloating) {
- if(c->isfullscreen)
- setfullscreen(c, False);
+ if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
                                 resize(c, c->x, c->y, nw, nh, True);
- }
                         break;
                 }
         } while(ev.type != ButtonRelease);
_AT_@ -1759,12 +1758,12 @@
 togglefloating(const Arg *arg) {
         if(!selmon->sel)
                 return;
+ if(selmon->sel->isfullscreen) /* no support for fullscreen windows */
+ return;
         selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
         if(selmon->sel->isfloating)
                 resize(selmon->sel, selmon->sel->x, selmon->sel->y,
                        selmon->sel->w, selmon->sel->h, False);
- else if(selmon->sel->isfullscreen)
- setfullscreen(selmon->sel, False);
         arrange(selmon);
 }
 
Received on Sat Jun 23 2012 - 09:05:27 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 23 2012 - 09:12:07 CEST