delayed window activationover one frame to prevent unwanted clicking behavior

This commit is contained in:
vurtun 2016-01-12 12:09:21 +01:00
parent 48e21814e4
commit ebe91cef38

View File

@ -6768,12 +6768,17 @@ zr_begin(struct zr_context *ctx, struct zr_layout *layout,
zr_remove_window(ctx, win);
zr_insert_window(ctx, win);
win->flags &= ~(zr_flags)ZR_WINDOW_ROM;
/* NOTE: I am not really sure if activating a window should directly
* happen on that frame or the following frame. Directly would simplify
* clicking window closing/minimizing but could case wrong behavior.
* For now I activate the window on the next frame to prevent wrong
* behavior. If not wanted just replace line with:
* win->flags &= ~(zr_flags)ZR_WINDOW_ROM; */
win->flags |= ZR_WINDOW_REMOVE_ROM;
ctx->active = win;
}
if (ctx->end != win)
win->flags |= ZR_WINDOW_ROM;
}
win->layout = layout;