]> git.sur5r.net Git - i3/i3/blobdiff - i3-nagbar/main.c
Free ws_assignments on reload
[i3/i3] / i3-nagbar / main.c
index 7d38f73140d741c635aa0de25bd0e5809d94df75..3e5f43e367ef6018b460daa337ef220c7b965ee8 100644 (file)
@@ -115,7 +115,7 @@ static void start_application(const char *command) {
         setsid();
         if (fork() == 0) {
             /* This is the child */
-            execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (void *)NULL);
+            execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL);
             /* not reached */
         }
         exit(0);
@@ -575,7 +575,9 @@ int main(int argc, char *argv[]) {
 
             case XCB_CONFIGURE_NOTIFY: {
                 xcb_configure_notify_event_t *configure_notify = (xcb_configure_notify_event_t *)event;
-                draw_util_surface_set_size(&bar, configure_notify->width, configure_notify->height);
+                if (configure_notify->width > 0 && configure_notify->height > 0) {
+                    draw_util_surface_set_size(&bar, configure_notify->width, configure_notify->height);
+                }
                 break;
             }
         }