aewl

changeset 278:c1187ddcd7f7

removed unneecessary crap
author Anselm R.Garbe <arg@10ksloc.org>
date Mon, 14 Aug 2006 15:43:04 +0200
parents 1e7fa455e3b4
children 2cedfbefd025
files event.c main.c
diffstat 2 files changed, 1 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/event.c	Mon Aug 14 15:33:23 2006 +0200
     1.2 +++ b/event.c	Mon Aug 14 15:43:04 2006 +0200
     1.3 @@ -4,7 +4,6 @@
     1.4   */
     1.5  #include "dwm.h"
     1.6  #include <stdlib.h>
     1.7 -#include <unistd.h>
     1.8  #include <X11/keysym.h>
     1.9  #include <X11/Xatom.h>
    1.10  
    1.11 @@ -361,11 +360,6 @@
    1.12  	unsigned int i;
    1.13  	KeyCode code;
    1.14  
    1.15 -	while(XGrabKeyboard(dpy, root, True, GrabModeAsync,
    1.16 -			 GrabModeAsync, CurrentTime) != GrabSuccess)
    1.17 -		usleep(1000);
    1.18 -	XUngrabKeyboard(dpy, CurrentTime);
    1.19 -
    1.20  	for(i = 0; i < len; i++) {
    1.21  		code = XKeysymToKeycode(dpy, key[i].keysym);
    1.22  		XGrabKey(dpy, code, key[i].mod, root, True,
    1.23 @@ -376,5 +370,6 @@
    1.24  				GrabModeAsync, GrabModeAsync);
    1.25  		XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root, True,
    1.26  				GrabModeAsync, GrabModeAsync);
    1.27 +		XSync(dpy, False);
    1.28  	}
    1.29  }
     2.1 --- a/main.c	Mon Aug 14 15:33:23 2006 +0200
     2.2 +++ b/main.c	Mon Aug 14 15:43:04 2006 +0200
     2.3 @@ -263,7 +263,6 @@
     2.4  		if(readin)
     2.5  			FD_SET(STDIN_FILENO, &rd);
     2.6  		FD_SET(xfd, &rd);
     2.7 -
     2.8  		i = select(xfd + 1, &rd, NULL, NULL, NULL);
     2.9  		if(i == -1 && errno == EINTR)
    2.10  			continue;