From 819ba3f1910eb9fb7f6eadaebe398bf57318d552 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 21 May 2008 14:13:40 +0200 Subject: [PATCH] [layout] Change {layout,statusbar}_refresh proto Signed-off-by: Julien Danjou --- awesome.c | 12 ++++++------ layout.c | 10 ++-------- layout.h | 2 +- mouse.c | 6 +++--- statusbar.c | 5 +++-- statusbar.h | 2 +- 6 files changed, 16 insertions(+), 21 deletions(-) diff --git a/awesome.c b/awesome.c index a19b550e..2f2c3bbc 100644 --- a/awesome.c +++ b/awesome.c @@ -472,8 +472,8 @@ main(int argc, char **argv) signal(SIGHUP, &exit_on_signal); /* refresh everything before waiting events */ - statusbar_refresh(); - layout_refresh(); + statusbar_refresh(NULL); + layout_refresh(NULL); /* main event loop, also reads status text from socket */ while(running) @@ -504,8 +504,8 @@ main(int argc, char **argv) break; buf[r] = '\0'; luaA_docmd(buf); - statusbar_refresh(); - layout_refresh(); + statusbar_refresh(NULL); + layout_refresh(NULL); } if(dbusfd >= 0 && FD_ISSET(dbusfd, &rd)) @@ -516,8 +516,8 @@ main(int argc, char **argv) xcb_handle_event(globalconf.evenths, ev); p_delete(&ev); } - statusbar_refresh(); - layout_refresh(); + statusbar_refresh(NULL); + layout_refresh(NULL); xcb_aux_sync(globalconf.connection); } diff --git a/layout.c b/layout.c index 344ac001..d356560a 100644 --- a/layout.c +++ b/layout.c @@ -94,20 +94,14 @@ arrange(int screen) /** Refresh the screen disposition * \return true if the screen was arranged, false otherwise */ -int -layout_refresh(void) +void * +layout_refresh(void *v __attribute__ ((unused))) { int screen; - int arranged = 0; for(screen = 0; screen < globalconf.screens_info->nscreen; screen++) if(globalconf.screens[screen].need_arrange) - { arrange(screen); - arranged++; - } - - return arranged; } /** Get current layout used on screen. diff --git a/layout.h b/layout.h index c3e7a6ed..7986b66f 100644 --- a/layout.h +++ b/layout.h @@ -28,7 +28,7 @@ typedef void (LayoutArrange)(int); LayoutArrange * layout_get_current(int); -int layout_refresh(void); +void * layout_refresh(void *); #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/mouse.c b/mouse.c index b05d0a37..de833641 100644 --- a/mouse.c +++ b/mouse.c @@ -287,14 +287,14 @@ mouse_client_move(int snap) move_client_to_screen(c, newscreen, true); globalconf.screens[c->screen].need_arrange = true; globalconf.screens[newscreen].need_arrange = true; - layout_refresh(); + layout_refresh(NULL); } if((target = client_get_bywin(globalconf.clients, mquery_pointer_r->child)) && target != c && !target->isfloating) { client_list_swap(&globalconf.clients, c, target); globalconf.screens[c->screen].need_arrange = true; - layout_refresh(); + layout_refresh(NULL); } p_delete(&mquery_pointer_r); } @@ -440,7 +440,7 @@ mouse_client_resize(void) { curtags[0]->mwfact = mwfact; globalconf.screens[c->screen].need_arrange = true; - layout_refresh(); + layout_refresh(NULL); } } p_delete(&ev); diff --git a/statusbar.c b/statusbar.c index e452e3d3..2fa8de1c 100644 --- a/statusbar.c +++ b/statusbar.c @@ -224,8 +224,8 @@ statusbar_position_update(statusbar_t *statusbar, position_t position) statusbar_draw(statusbar); } -void -statusbar_refresh() +void * +statusbar_refresh(void *p __attribute__ ((unused))) { int screen; statusbar_t *statusbar; @@ -236,6 +236,7 @@ statusbar_refresh() statusbar = statusbar->next) if(statusbar->need_update) statusbar_draw(statusbar); + return NULL; } statusbar_t * diff --git a/statusbar.h b/statusbar.h index d24a61a2..a1ab23dc 100644 --- a/statusbar.h +++ b/statusbar.h @@ -36,7 +36,7 @@ statusbar_delete(statusbar_t **statusbar) p_delete(statusbar); } -void statusbar_refresh(void); +void * statusbar_refresh(void *); statusbar_t * statusbar_getbyname(int, const char *); DO_RCNT(statusbar_t, statusbar, statusbar_delete)