]> git.sur5r.net Git - i3/i3/commitdiff
manage_window: cleaner variable declarations
authorOrestis Floros <orestisf1993@gmail.com>
Thu, 4 Oct 2018 12:29:18 +0000 (15:29 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Sat, 13 Oct 2018 18:10:10 +0000 (21:10 +0300)
src/manage.c

index 4031ade63b859cc55d709a47c33d8ad1b04cc91e..c4706b0dd20892b4c2493f9344f34ce753e31dac 100644 (file)
@@ -246,17 +246,13 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
 
     DLOG("Initial geometry: (%d, %d, %d, %d)\n", geom->x, geom->y, geom->width, geom->height);
 
-    Con *nc = NULL;
-    Match *match = NULL;
-    Assignment *assignment;
-
-    /* TODO: two matches for one container */
-
     /* See if any container swallows this new window */
-    nc = con_for_window(search_at, cwindow, &match);
+    Match *match = NULL;
+    Con *nc = con_for_window(search_at, cwindow, &match);
     const bool match_from_restart_mode = (match && match->restart_mode);
     if (nc == NULL) {
         Con *wm_desktop_ws = NULL;
+        Assignment *assignment;
 
         /* If not, check if it is assigned to a specific workspace */
         if ((assignment = assignment_for(cwindow, A_TO_WORKSPACE)) ||