diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/events.c | 2 | ||||
-rw-r--r-- | src/group.c | 1 | ||||
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/manage.c | 3 | ||||
-rw-r--r-- | src/number.c | 11 |
5 files changed, 17 insertions, 5 deletions
diff --git a/src/events.c b/src/events.c index 1ecd4a2..1d62e74 100644 --- a/src/events.c +++ b/src/events.c @@ -232,7 +232,7 @@ configure_request (XConfigureRequestEvent *e) { if (e->value_mask & CWStackMode) { - if (e->detail == Above) + if (e->detail == Above && win->state != WithdrawnState) { /* Depending on the rudeness level, actually map the window. */ diff --git a/src/group.c b/src/group.c index 3e637aa..ab95d2f 100644 --- a/src/group.c +++ b/src/group.c @@ -289,7 +289,6 @@ group_del_window (rp_group *g, rp_window *win) { if (cur->win == win) { - numset_release (g->numset, cur->number); list_del (&cur->node); free (cur); } @@ -681,8 +681,6 @@ free_screen (rp_screen *s) XFreeGC (dpy, s->normal_gc); free (s->display_string); - - numset_free (s->frames_numset); } void @@ -707,6 +705,9 @@ clean_up () } free (screens); + /* Free the global frame numset shared by all screens. */ + free (rp_frame_numset); + free_xinerama(); XFreeFont (dpy, defaults.font); diff --git a/src/manage.c b/src/manage.c index b11dc4a..c30b242 100644 --- a/src/manage.c +++ b/src/manage.c @@ -877,6 +877,9 @@ withdraw_window (rp_window *win) /* Give back the window number. the window will get another one, if it is remapped. */ + if (win->number == -1) + PRINT_ERROR(("Attempting to withdraw '%s' with number -1!\n", window_name(win))); + numset_release (rp_window_numset, win->number); win->number = -1; diff --git a/src/number.c b/src/number.c index a6ddd8e..b71d0de 100644 --- a/src/number.c +++ b/src/number.c @@ -71,6 +71,8 @@ numset_find_empty_cell (struct numset *ns) int numset_add_num (struct numset *ns, int n) { + PRINT_DEBUG(("ns=%p add_num %d\n", ns, n)); + if (numset_num_is_taken (ns, n)) return 0; /* failed. */ @@ -84,12 +86,14 @@ int numset_request (struct numset *ns) { int i; - + /* look for a unique number, and add it to the list of taken numbers. */ i = 0; while (!numset_add_num (ns, i)) i++; + PRINT_DEBUG(("ns=%p request got %d\n", ns, i)); + return i; } @@ -100,6 +104,11 @@ numset_release (struct numset *ns, int n) { int i; + PRINT_DEBUG(("ns=%p release %d\n", ns, n)); + + if (n < 0) + PRINT_ERROR(("ns=%p Attempt to release %d!", ns, n)); + for (i=0; i<ns->num_taken; i++) { if (ns->numbers_taken[i] == n) |