[layout] Change {layout,statusbar}_refresh proto
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
88c9671ab1
commit
819ba3f191
12
awesome.c
12
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);
|
||||
}
|
||||
|
||||
|
|
10
layout.c
10
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.
|
||||
|
|
2
layout.h
2
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
|
||||
|
|
6
mouse.c
6
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);
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue