From be9b3deb351e01ff00f69fb9bd202e2b787144e4 Mon Sep 17 00:00:00 2001
From: David Maciejak <david.maciejak@gmail.com>
Date: Thu, 11 Sep 2014 07:15:53 +0700
Subject: [PATCH 3/5] wmaker: use defined wWindowSingleFocus() function 

This patch is cleaning focuswindow() local function to call
wWindowSingleFocus() global function.

---
 src/switchmenu.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/switchmenu.c b/src/switchmenu.c
index db7a40e..ae37dd2 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)
-- 
1.8.3.2

