Move wibox_systray_kickout() up

Next commit will need this function and I wanted to make it clearer that no
changes where done to this function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-18 09:53:45 +02:00
parent 5992a6929f
commit f8c9b6f704
1 changed files with 21 additions and 21 deletions

View File

@ -33,6 +33,27 @@
LUA_OBJECT_FUNCS(wibox_class, wibox_t, wibox)
/** Kick out systray windows.
* \param phys_screen Physical screen number.
*/
static void
wibox_systray_kickout(int phys_screen)
{
xcb_screen_t *s = xutil_screen_get(globalconf.connection, phys_screen);
if(globalconf.screens.tab[phys_screen].systray.parent != s->root)
{
/* Who! Check that we're not deleting a wibox with a systray, because it
* may be its parent. If so, we reparent to root before, otherwise it will
* hurt very much. */
xcb_reparent_window(globalconf.connection,
globalconf.screens.tab[phys_screen].systray.window,
s->root, -512, -512);
globalconf.screens.tab[phys_screen].systray.parent = s->root;
}
}
/** Destroy all X resources of a wibox.
* \param w The wibox to wipe.
*/
@ -383,27 +404,6 @@ wibox_map(wibox_t *wibox)
stack_windows();
}
/** Kick out systray windows.
* \param phys_screen Physical screen number.
*/
static void
wibox_systray_kickout(int phys_screen)
{
xcb_screen_t *s = xutil_screen_get(globalconf.connection, phys_screen);
if(globalconf.screens.tab[phys_screen].systray.parent != s->root)
{
/* Who! Check that we're not deleting a wibox with a systray, because it
* may be its parent. If so, we reparent to root before, otherwise it will
* hurt very much. */
xcb_reparent_window(globalconf.connection,
globalconf.screens.tab[phys_screen].systray.window,
s->root, -512, -512);
globalconf.screens.tab[phys_screen].systray.parent = s->root;
}
}
static void
wibox_systray_refresh(wibox_t *wibox)
{