From ad9b0d6ea6264a861e6bde6bab58520cf28c13b8 Mon Sep 17 00:00:00 2001 From: "Enno Boland (tox)" Date: Tue, 8 Sep 2009 16:24:13 +0200 Subject: removing autostart. using stdin instead. --- tabbed.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'tabbed.c') diff --git a/tabbed.c b/tabbed.c index 2e55cc7..bba55b8 100644 --- a/tabbed.c +++ b/tabbed.c @@ -45,11 +45,6 @@ typedef struct { const Arg arg; } Key; -typedef struct { - void (*func)(const Arg *); - const Arg arg; -} Autostart; - typedef struct { int x, y, w, h; unsigned long norm[ColLast]; @@ -78,7 +73,6 @@ typedef struct Listener { } Listener; /* function declarations */ -static void autostart(void); static void buttonpress(XEvent *e); static void cleanup(void); static void configurenotify(XEvent *e); @@ -135,14 +129,6 @@ static Bool badwindow = False; /* configuration, allows nested code to access above variables */ #include "config.h" -void -autostart() { - int i; - - for(i = 0; i < LENGTH(autostarts); i++) - autostarts[i].func(&(autostarts[i].arg)); -} - void buttonpress(XEvent *e) { int i; @@ -685,6 +671,8 @@ setup(void) { class_hint.res_name = "tabbed"; class_hint.res_class = "Tabbed"; XSetClassHint(dpy, win, &class_hint); + listeners = emallocz(sizeof(Listener)); + listeners->fd = STDIN_FILENO; } int @@ -772,7 +760,6 @@ main(int argc, char *argv[]) { if(!(dpy = XOpenDisplay(0))) die("tabbed: cannot open display\n"); setup(); - autostart(); run(); /*dummys*/ cleanup(); -- cgit v1.2.3