#include <sys/types.h>
#include <sys/wait.h>
-
typedef struct {
enum {
COMPLETE=0, MATCHES, IS, ISSET, ISDIR, ISFILE,
if (debug)
printf(" %s '%s' '%s'\n", type2str(rule->type), rule->arg1, rule->arg2);
if (!apply_rule(rule)) {
- printf(" FAIL\n");
+ if (debug)
+ printf(" FAIL\n");
break;
}
}
ev.xclient.format = 32;
ev.xclient.data.l[0] = val;
XSendEvent(x->display, to, False, mask, &ev);
- XFlush(x->display);
}
void win_open(XConf* x, Window winid, char* path, char* addr) {
XMapRaised(x->display, win->win);
win_send(x, x->self, win->win, 0, "GOTO", strtoul(addr, NULL, 0));
win_send(x, x->self, winid, 0, "DONE", 0);
- XSync(x->display, False);
free(type);
return;
}
}
void selclear(XConf* x, XEvent* e) {
- (void)x, (void)e;
+ (void)e;
+ XSync(x->display, False);
puts("quitting");
exit(0);
}
win_add(x, e->xclient.window);
else if (XA_DEL == (Atom)(e->xclient.data.l[0]))
win_del(e->xclient.window);
+ XSync(x->display, False);
}
void propnotify(XConf* x, XEvent* e) {
if(file) XFree(file);
if(addr) XFree(addr);
}
+ XSync(x->display, False);
+
/* cleanup any invalid windows */
// TWindow* wins = Windows;
// Windows = NULL;