manage_window: cleaner variable declarations

This commit is contained in:
Orestis Floros 2018-10-04 15:29:18 +03:00
parent 966915cfb2
commit 8c17e4e38d
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 3 additions and 7 deletions

View 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); 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 */ /* 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); const bool match_from_restart_mode = (match && match->restart_mode);
if (nc == NULL) { if (nc == NULL) {
Con *wm_desktop_ws = NULL; Con *wm_desktop_ws = NULL;
Assignment *assignment;
/* If not, check if it is assigned to a specific workspace */ /* If not, check if it is assigned to a specific workspace */
if ((assignment = assignment_for(cwindow, A_TO_WORKSPACE)) || if ((assignment = assignment_for(cwindow, A_TO_WORKSPACE)) ||