X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fmenu%2Ffifo_menu.c;h=e5580b053e4abba7c12e463f4f8b7e3e86183b0c;hb=a95dc346fe7951dd48e41a41fcaafb6d872b0337;hp=c4bc179e0fe6da7906dcb4a5ec4c375120921739;hpb=b46222c3d9b4b638b14647871d41249db9726422;p=chaz%2Fopenbox diff --git a/plugins/menu/fifo_menu.c b/plugins/menu/fifo_menu.c index c4bc179e..e5580b05 100644 --- a/plugins/menu/fifo_menu.c +++ b/plugins/menu/fifo_menu.c @@ -20,11 +20,11 @@ typedef struct Fifo_Menu_Data{ event_fd_handler *handler; } Fifo_Menu_Data; -#define FIFO_MENU(m) ((Menu *)m) -#define FIFO_MENU_DATA(m) ((Fifo_Menu_Data *)((Menu *)m)->plugin_data) +#define FIFO_MENU(m) ((ObMenu *)m) +#define FIFO_MENU_DATA(m) ((Fifo_Menu_Data *)((ObMenu *)m)->plugin_data) -void fifo_menu_clean_up(Menu *m) { +void fifo_menu_clean_up(ObMenu *m) { if (FIFO_MENU_DATA(m)->buf != NULL) { g_free(FIFO_MENU_DATA(m)->buf); FIFO_MENU_DATA(m)->buf = NULL; @@ -42,12 +42,15 @@ void plugin_startup() { } void plugin_shutdown() { } -void fifo_menu_handler(int fd, Menu *menu) { +void fifo_menu_handler(int fd, void *d) { + ObMenu *menu = d; char *tmpbuf = NULL; unsigned long num_read; #ifdef DEBUG /* because gdb is dumb */ +#if 0 Fifo_Menu_Data *d = FIFO_MENU_DATA(menu); +#endif #endif /* if the menu is shown this will go into busy loop :( @@ -113,7 +116,7 @@ void fifo_menu_handler(int fd, Menu *menu) { } } -void plugin_destroy (Menu *m) +void plugin_destroy (ObMenu *m) { fifo_menu_clean_up(m); if (FIFO_MENU_DATA(m)->handler != NULL) { @@ -138,7 +141,7 @@ void *plugin_create() /* TODO: need config */ event_fd_handler *h; Fifo_Menu_Data *d = g_new(Fifo_Menu_Data, 1); - Menu *m = menu_new("", PLUGIN_NAME, NULL); + ObMenu *m = menu_new("", PLUGIN_NAME, NULL); d->fd = -1; d->buf = NULL;