[layout] Change {layout,statusbar}_refresh proto

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-21 14:13:40 +02:00
parent 88c9671ab1
commit 819ba3f191
6 changed files with 16 additions and 21 deletions

View File

@ -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);
}

View File

@ -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.

View File

@ -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

View File

@ -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);

View File

@ -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 *

View File

@ -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)