changeset: 825:bef1854ce739
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Thu Feb 22 12:00:02 2007 +0100
summary: fixed some issues due to the Arg->const char * transition
diff -r f0ee918c0551 -r bef1854ce739 event.c
--- a/event.c Thu Feb 22 11:45:03 2007 +0100
+++ b/event.c Thu Feb 22 12:00:02 2007 +0100
@@ -113,29 +113,29 @@ resizemouse(Client *c) {
static void
buttonpress(XEvent *e) {
- static char arg[8];
- int i, x;
+ static char buf[32];
+ unsigned int i, x;
Client *c;
XButtonPressedEvent *ev = &e->xbutton;
- arg[0] = 0;
+ buf[0] = 0;
if(barwin == ev->window) {
x = 0;
for(i = 0; i < ntags; i++) {
x += textw(tags[i]);
if(ev->x < x) {
- snprintf(arg, sizeof arg, "%d", i);
+ snprintf(buf, sizeof buf, "%d", i);
if(ev->button == Button1) {
if(ev->state & MODKEY)
- tag(arg);
+ tag(buf);
else
- view(arg);
+ view(buf);
}
else if(ev->button == Button3) {
if(ev->state & MODKEY)
- toggletag(arg);
+ toggletag(buf);
else
- toggleview(arg);
+ toggleview(buf);
}
return;
}
@@ -143,7 +143,7 @@ buttonpress(XEvent *e) {
if(ev->x < x + blw)
switch(ev->button) {
case Button1:
- setlayout("-1");
+ setlayout(NULL);
break;
}
}
diff -r f0ee918c0551 -r bef1854ce739 layout.c
--- a/layout.c Thu Feb 22 11:45:03 2007 +0100
+++ b/layout.c Thu Feb 22 12:00:02 2007 +0100
@@ -2,6 +2,7 @@
* See LICENSE file for license details.
*/
#include "dwm.h"
+#include <stdlib.h>
unsigned int blw = 0;
Layout *lt = NULL;
Received on Thu Feb 22 2007 - 11:59:53 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:43 UTC