dwm-meillo

diff client.c @ 164:21071ae1fe68

made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
author arg@10ksloc.org
date Wed, 02 Aug 2006 16:32:05 +0200
parents e2e1de08341d
children 1db04019684e
line diff
     1.1 --- a/client.c	Wed Aug 02 13:05:04 2006 +0200
     1.2 +++ b/client.c	Wed Aug 02 16:32:05 2006 +0200
     1.3 @@ -3,7 +3,6 @@
     1.4   * See LICENSE file for license details.
     1.5   */
     1.6  #include "dwm.h"
     1.7 -
     1.8  #include <stdlib.h>
     1.9  #include <string.h>
    1.10  #include <X11/Xatom.h>
    1.11 @@ -219,7 +218,7 @@
    1.12  	c->h = wa->height;
    1.13  	c->th = bh;
    1.14  
    1.15 -	c->border = 1;
    1.16 +	c->border = 0;
    1.17  	setsize(c);
    1.18  
    1.19  	if(c->h != sh && c->y < bh)
    1.20 @@ -254,8 +253,7 @@
    1.21  	if(!c->isfloat)
    1.22  		c->isfloat = trans
    1.23  			|| (c->maxw && c->minw &&
    1.24 -				c->maxw == c->minw && c->maxh == c->minh)
    1.25 -			|| (c->w == sw && c->h == sh);
    1.26 +				c->maxw == c->minw && c->maxh == c->minh);
    1.27  	settitle(c);
    1.28  	arrange(NULL);
    1.29  
    1.30 @@ -271,7 +269,7 @@
    1.31  {
    1.32  	int bottom = c->y + c->h;
    1.33  	int right = c->x + c->w;
    1.34 -	XConfigureEvent e;
    1.35 +	/*XConfigureEvent e;*/
    1.36  	XWindowChanges wc;
    1.37  
    1.38  	if(sizehints) {
    1.39 @@ -302,21 +300,11 @@
    1.40  	wc.y = c->y;
    1.41  	wc.width = c->w;
    1.42  	wc.height = c->h;
    1.43 -	wc.border_width = 1;
    1.44 -	XConfigureWindow(dpy, c->win,
    1.45 -			CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
    1.46 -
    1.47 -	e.type = ConfigureNotify;
    1.48 -	e.event = c->win;
    1.49 -	e.window = c->win;
    1.50 -	e.x = c->x;
    1.51 -	e.y = c->y;
    1.52 -	e.width = c->w;
    1.53 -	e.height = c->h;
    1.54 -	e.border_width = c->border;
    1.55 -	e.above = None;
    1.56 -	e.override_redirect = False;
    1.57 -	XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent *)&e);
    1.58 +	if(c->w == sw && c->h == sh)
    1.59 +		wc.border_width = 0;
    1.60 +	else
    1.61 +		wc.border_width = 1;
    1.62 +	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
    1.63  	XSync(dpy, False);
    1.64  }
    1.65  
    1.66 @@ -403,8 +391,8 @@
    1.67  		oh = sel->h;
    1.68  		sel->x = sx;
    1.69  		sel->y = sy + bh;
    1.70 -		sel->w = sw - 2 * sel->border;
    1.71 -		sel->h = sh - 2 * sel->border - bh;
    1.72 +		sel->w = sw - 2;
    1.73 +		sel->h = sh - 2 - bh;
    1.74  
    1.75  		higher(sel);
    1.76  		resize(sel, False, TopLeft);