Browse Source

Fixed #647 window open/close flickering

Opening and closing a set of windows with at least one other window
active caused flickering if a window as closed. Reason was a missing
check inside `nk_build` that did not skip newly closed windows.

I am not 100% sure but this could also affect #637 but I still needs to
be tested.
vurtun 7 years ago
parent
commit
94c0412a08
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nuklear.h

+ 1 - 1
nuklear.h

@@ -18941,7 +18941,7 @@ nk_build(struct nk_context *ctx)
 
 
         cmd = nk_ptr_add(struct nk_command, buffer, it->buffer.last);
         cmd = nk_ptr_add(struct nk_command, buffer, it->buffer.last);
         while (next && ((next->buffer.last == next->buffer.begin) ||
         while (next && ((next->buffer.last == next->buffer.begin) ||
-            (next->flags & NK_WINDOW_HIDDEN)))
+            (next->flags & NK_WINDOW_HIDDEN) || next->seq != ctx->seq))
             next = next->next; /* skip empty command buffers */
             next = next->next; /* skip empty command buffers */
 
 
         if (next) cmd->next = next->buffer.begin;
         if (next) cmd->next = next->buffer.begin;