diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xlib.c | 10 | 
1 files changed, 10 insertions, 0 deletions
| @@ -226,6 +226,16 @@ void handlekeypress(XEvent *event){  void handleevent(XEvent *event){  	switch(event->type){ +		/* Might not get ConfigureNotify, for example if there's no window manager */ +		case MapNotify: +			if (!width || !height) +			{ +				XWindowAttributes attr; +				XGetWindowAttributes(event->xmap.display, event->xmap.window, &attr); +				width = attr.width; +				height = attr.height; +			} +			break;	  		case ConfigureNotify:  			if(width != event->xconfigure.width || height != event->xconfigure.height){  				width = event->xconfigure.width; | 
