diff options
-rw-r--r-- | src/manage.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/manage.c b/src/manage.c index c46509d..d40fb07 100644 --- a/src/manage.c +++ b/src/manage.c @@ -169,11 +169,20 @@ scanwins(screen_info *s) int unmanaged_window (Window w) { + char *wname; int i; for (i = 0; unmanaged_window_list[i]; i++) - if (!strcmp (unmanaged_window_list[i], get_window_name (w))) - return 1; + { + wname = get_window_name (w); + if (!wname) + return 1; + if (!strcmp (unmanaged_window_list[i], wname)) + { + free (wname); + return 1; + } + } return 0; } |