dwm-meillo

diff event.c @ 461:9d23330a5268

removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 12 Sep 2006 10:57:28 +0200
parents ffb462fb7903
children ad3fa2d18542
line diff
     1.1 --- a/event.c	Tue Sep 12 09:50:06 2006 +0200
     1.2 +++ b/event.c	Tue Sep 12 10:57:28 2006 +0200
     1.3 @@ -21,8 +21,7 @@
     1.4  #define CLEANMASK(mask) (mask & ~(numlockmask | LockMask))
     1.5  
     1.6  static void
     1.7 -movemouse(Client *c)
     1.8 -{
     1.9 +movemouse(Client *c) {
    1.10  	int x1, y1, ocx, ocy, di;
    1.11  	unsigned int dui;
    1.12  	Window dummy;
    1.13 @@ -37,7 +36,8 @@
    1.14  	for(;;) {
    1.15  		XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
    1.16  		switch (ev.type) {
    1.17 -		default: break;
    1.18 +		default:
    1.19 +			break;
    1.20  		case Expose:
    1.21  			handler[Expose](&ev);
    1.22  			break;
    1.23 @@ -55,8 +55,7 @@
    1.24  }
    1.25  
    1.26  static void
    1.27 -resizemouse(Client *c)
    1.28 -{
    1.29 +resizemouse(Client *c) {
    1.30  	int ocx, ocy;
    1.31  	int nw, nh;
    1.32  	Corner sticky;
    1.33 @@ -71,7 +70,8 @@
    1.34  	for(;;) {
    1.35  		XMaskEvent(dpy, MOUSEMASK | ExposureMask, &ev);
    1.36  		switch(ev.type) {
    1.37 -		default: break;
    1.38 +		default:
    1.39 +			break;
    1.40  		case Expose:
    1.41  			handler[Expose](&ev);
    1.42  			break;
    1.43 @@ -97,8 +97,7 @@
    1.44  }
    1.45  
    1.46  static void
    1.47 -buttonpress(XEvent *e)
    1.48 -{
    1.49 +buttonpress(XEvent *e) {
    1.50  	int x;
    1.51  	Arg a;
    1.52  	Client *c;
    1.53 @@ -147,8 +146,7 @@
    1.54  }
    1.55  
    1.56  static void
    1.57 -synconfig(Client *c, int x, int y, int w, int h, unsigned int border)
    1.58 -{
    1.59 +synconfig(Client *c, int x, int y, int w, int h, unsigned int border) {
    1.60  	XEvent synev;
    1.61  
    1.62  	synev.type = ConfigureNotify;
    1.63 @@ -165,8 +163,7 @@
    1.64  }
    1.65  
    1.66  static void
    1.67 -configurerequest(XEvent *e)
    1.68 -{
    1.69 +configurerequest(XEvent *e) {
    1.70  	unsigned long newmask;
    1.71  	Client *c;
    1.72  	XConfigureRequestEvent *ev = &e->xconfigurerequest;
    1.73 @@ -219,8 +216,7 @@
    1.74  }
    1.75  
    1.76  static void
    1.77 -destroynotify(XEvent *e)
    1.78 -{
    1.79 +destroynotify(XEvent *e) {
    1.80  	Client *c;
    1.81  	XDestroyWindowEvent *ev = &e->xdestroywindow;
    1.82  
    1.83 @@ -229,8 +225,7 @@
    1.84  }
    1.85  
    1.86  static void
    1.87 -enternotify(XEvent *e)
    1.88 -{
    1.89 +enternotify(XEvent *e) {
    1.90  	Client *c;
    1.91  	XCrossingEvent *ev = &e->xcrossing;
    1.92  
    1.93 @@ -247,8 +242,7 @@
    1.94  }
    1.95  
    1.96  static void
    1.97 -expose(XEvent *e)
    1.98 -{
    1.99 +expose(XEvent *e) {
   1.100  	Client *c;
   1.101  	XExposeEvent *ev = &e->xexpose;
   1.102  
   1.103 @@ -261,8 +255,7 @@
   1.104  }
   1.105  
   1.106  static void
   1.107 -keypress(XEvent *e)
   1.108 -{
   1.109 +keypress(XEvent *e) {
   1.110  	static unsigned int len = sizeof(key) / sizeof(key[0]);
   1.111  	unsigned int i;
   1.112  	KeySym keysym;
   1.113 @@ -270,8 +263,8 @@
   1.114  
   1.115  	keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
   1.116  	for(i = 0; i < len; i++) {
   1.117 -		if(keysym == key[i].keysym &&
   1.118 -				CLEANMASK(key[i].mod) == CLEANMASK(ev->state))
   1.119 +		if(keysym == key[i].keysym
   1.120 +			&& CLEANMASK(key[i].mod) == CLEANMASK(ev->state))
   1.121  		{
   1.122  			if(key[i].func)
   1.123  				key[i].func(&key[i].arg);
   1.124 @@ -281,8 +274,7 @@
   1.125  }
   1.126  
   1.127  static void
   1.128 -leavenotify(XEvent *e)
   1.129 -{
   1.130 +leavenotify(XEvent *e) {
   1.131  	XCrossingEvent *ev = &e->xcrossing;
   1.132  
   1.133  	if((ev->window == root) && !ev->same_screen) {
   1.134 @@ -292,8 +284,7 @@
   1.135  }
   1.136  
   1.137  static void
   1.138 -mappingnotify(XEvent *e)
   1.139 -{
   1.140 +mappingnotify(XEvent *e) {
   1.141  	XMappingEvent *ev = &e->xmapping;
   1.142  
   1.143  	XRefreshKeyboardMapping(ev);
   1.144 @@ -302,8 +293,7 @@
   1.145  }
   1.146  
   1.147  static void
   1.148 -maprequest(XEvent *e)
   1.149 -{
   1.150 +maprequest(XEvent *e) {
   1.151  	static XWindowAttributes wa;
   1.152  	XMapRequestEvent *ev = &e->xmaprequest;
   1.153  
   1.154 @@ -321,8 +311,7 @@
   1.155  }
   1.156  
   1.157  static void
   1.158 -propertynotify(XEvent *e)
   1.159 -{
   1.160 +propertynotify(XEvent *e) {
   1.161  	Client *c;
   1.162  	Window trans;
   1.163  	XPropertyEvent *ev = &e->xproperty;
   1.164 @@ -354,8 +343,7 @@
   1.165  }
   1.166  
   1.167  static void
   1.168 -unmapnotify(XEvent *e)
   1.169 -{
   1.170 +unmapnotify(XEvent *e) {
   1.171  	Client *c;
   1.172  	XUnmapEvent *ev = &e->xunmap;
   1.173  
   1.174 @@ -380,8 +368,7 @@
   1.175  };
   1.176  
   1.177  void
   1.178 -grabkeys()
   1.179 -{
   1.180 +grabkeys() {
   1.181  	static unsigned int len = sizeof(key) / sizeof(key[0]);
   1.182  	unsigned int i;
   1.183  	KeyCode code;
   1.184 @@ -401,8 +388,7 @@
   1.185  }
   1.186  
   1.187  void
   1.188 -procevent()
   1.189 -{
   1.190 +procevent() {
   1.191  	XEvent ev;
   1.192  
   1.193  	while(XPending(dpy)) {
   1.194 @@ -411,4 +397,3 @@
   1.195  			(handler[ev.type])(&ev); /* call handler */
   1.196  	}
   1.197  }
   1.198 -