From 39f6130a285437c0e63c3982ac41b87fc9f8a856 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Thu, 11 Sep 2014 07:15:53 +0700 Subject: [PATCH] wmaker: use defined wWindowSingleFocus() function This patch is cleaning focuswindow() local function to call wWindowSingleFocus() global function. Signed-off-by: Carlos R. Mafra --- src/switchmenu.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/switchmenu.c b/src/switchmenu.c index db7a40e2..ae37dd2a 100644 --- a/src/switchmenu.c +++ b/src/switchmenu.c @@ -62,26 +62,12 @@ static void wsobserver(void *self, WMNotification * notif); static void focusWindow(WMenu * menu, WMenuEntry * entry) { WWindow *wwin; - WScreen *scr; - int x, y, move = 0; /* Parameter not used, but tell the compiler that it is ok */ (void) menu; wwin = (WWindow *) entry->clientdata; - scr = wwin->screen_ptr; - - wMakeWindowVisible(wwin); - - x = wwin->frame_x; - y = wwin->frame_y; - - /* bring window back to visible area */ - move = wScreenBringInside(scr, &x, &y, wwin->frame->core->width, wwin->frame->core->height); - - if (move) { - wWindowConfigure(wwin, x, y, wwin->client.width, wwin->client.height); - } + wWindowSingleFocus(wwin); } void InitializeSwitchMenu(void)