diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 9 | ||||
-rw-r--r-- | src/ui/window.c | 2 |
2 files changed, 10 insertions, 1 deletions
@@ -570,6 +570,15 @@ static int resizeWatcher_(void *user, SDL_Event *event) { | |||
570 | iApp *d = user; | 570 | iApp *d = user; |
571 | if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) { | 571 | if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) { |
572 | const SDL_WindowEvent *winev = &event->window; | 572 | const SDL_WindowEvent *winev = &event->window; |
573 | #if defined (iPlatformMsys) | ||
574 | resetFonts_Text(); { | ||
575 | SDL_Event u = { .type = SDL_USEREVENT }; | ||
576 | u.user.code = command_UserEventCode; | ||
577 | u.user.data1 = strdup("theme.changed"); | ||
578 | u.user.windowID = SDL_GetWindowID(d->window->win); | ||
579 | dispatchEvent_Widget(d->window->root, &u); | ||
580 | } | ||
581 | #endif | ||
573 | drawWhileResizing_Window(d->window, winev->data1, winev->data2); | 582 | drawWhileResizing_Window(d->window, winev->data1, winev->data2); |
574 | } | 583 | } |
575 | return 0; | 584 | return 0; |
diff --git a/src/ui/window.c b/src/ui/window.c index dd9181ad..dadfae6d 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -528,7 +528,7 @@ static void updateRootSize_Window_(iWindow *d, iBool notifyAlways) { | |||
528 | void drawWhileResizing_Window(iWindow *d, int w, int h) { | 528 | void drawWhileResizing_Window(iWindow *d, int w, int h) { |
529 | /* This is called while a window resize is in progress, so we can be pretty confident | 529 | /* This is called while a window resize is in progress, so we can be pretty confident |
530 | the size has actually changed. */ | 530 | the size has actually changed. */ |
531 | d->root->rect.size = mulf_I2(init_I2(w, h), d->pixelRatio); | 531 | d->root->rect.size = coord_Window(d, w, h); |
532 | arrange_Widget(d->root); | 532 | arrange_Widget(d->root); |
533 | draw_Window(d); | 533 | draw_Window(d); |
534 | } | 534 | } |