From bf253ba3bcafac3c098133aaeb8725f5b67d59fc Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 27 Jun 2008 22:49:54 +0200 Subject: [PATCH] client: split stack/raise Signed-off-by: Julien Danjou --- client.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/client.c b/client.c index 08e69ad0..1e3df4f7 100644 --- a/client.c +++ b/client.c @@ -262,13 +262,12 @@ client_focus(client_t *c, int screen) widget_invalidate_cache(screen, WIDGET_CACHE_CLIENTS); } -/** Restack clients and puts c in top of its layer. - * \param c The client to stack on top of others. +/** Restack clients. * \todo It might be worth stopping to restack everyone and only stack `c' * relatively to the first matching in the list. */ -void -client_raise(client_t *c) +static void +client_stack(void) { uint32_t config_win_vals[2]; client_node_t *node; @@ -277,9 +276,6 @@ client_raise(client_t *c) int screen; xembed_window_t *emwin; - /* Push c on top of the stack. */ - stack_client_push(c); - config_win_vals[0] = XCB_NONE; config_win_vals[1] = XCB_STACK_MODE_BELOW; @@ -348,6 +344,17 @@ client_raise(client_t *c) } } +/** Put client on top of the stack + * \param c The client to raise. + */ +void +client_raise(client_t *c) +{ + /* Push c on top of the stack. */ + stack_client_push(c); + client_stack(); +} + /** Manage a new client. * \param w The window. * \param wgeom Window geometry.