Unified · Split
| @@ -295,9 +295,7 @@ static void push_layout(mu_Context *ctx, mu_Rect body, mu_Vec2 scroll) { · 294 unmodified lines | ||
| 295 | 295 | mu_Layout layout; |
| 296 | 296 | int width = 0; |
| 297 | 297 | memset(&layout, 0, sizeof(mu_Layout)); |
| 298 | − layout.body = body; | |
| 299 | − layout.body.x -= scroll.x; | |
| 300 | − layout.body.y -= scroll.y; | |
| 298 | + layout.body = mu_rect(body.x - scroll.x, body.y - scroll.y, body.w, body.h); | |
| 301 | 299 | layout.max = mu_vec2(-0x1000000, -0x1000000); |
| 302 | 300 | push(ctx->layout_stack, layout); |
| 303 | 301 | mu_layout_row(ctx, 1, &width, 0); |
| @@ -1046,7 +1044,7 @@ static void begin_root_container(mu_Context *ctx, mu_Container *cnt) { · 742 unmodified lines | ||
| 1046 | 1044 | { |
| 1047 | 1045 | ctx->hover_root = cnt; |
| 1048 | 1046 | } |
| 1049 | − /* clipping is set directly here in case a root-container is made within | |
| 1047 | + /* clipping is reset here in case a root-container is made within | |
| 1050 | 1048 | ** another root-containers's begin/end block; this prevents the inner |
| 1051 | 1049 | ** root-container being clipped to the outer */ |
| 1052 | 1050 | push(ctx->clip_stack, unclipped_rect); |
| @@ -1143,9 +1141,7 @@ int mu_begin_window_ex(mu_Context *ctx, mu_Container *cnt, const char *title, · 90 unmodified lines | ||
| 1143 | 1141 | } |
| 1144 | 1142 | |
| 1145 | 1143 | /* close if this is a popup window and elsewhere was clicked */ |
| 1146 | − if ((opt & MU_OPT_POPUP) && ctx->mouse_pressed && | |
| 1147 | − ctx->last_hover_root != cnt) | |
| 1148 | − { | |
| 1144 | + if (opt & MU_OPT_POPUP && ctx->mouse_pressed && ctx->last_hover_root != cnt) { | |
| 1149 | 1145 | cnt->open = 0; |
| 1150 | 1146 | } |
| 1151 | 1147 | |