summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index c63ad76a..fa364cff 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1676,9 +1676,13 @@ iWindow *newPopup_Window(iInt2 screenPos, iWidget *rootWidget) {
1676#if !defined (iPlatformApple) 1676#if !defined (iPlatformApple)
1677 setForceSoftwareRender_App(iTrue); 1677 setForceSoftwareRender_App(iTrue);
1678#endif 1678#endif
1679 SDL_Rect usableRect;
1680 SDL_GetDisplayUsableBounds(SDL_GetWindowDisplayIndex(get_MainWindow()->base.win),
1681 &usableRect);
1679 iWindow *win = 1682 iWindow *win =
1680 new_Window(popup_WindowType, 1683 new_Window(popup_WindowType,
1681 (iRect){ screenPos, divf_I2(rootWidget->rect.size, get_Window()->pixelRatio) }, 1684 (iRect){ screenPos, min_I2(divf_I2(rootWidget->rect.size, get_Window()->pixelRatio),
1685 init_I2(usableRect.w, usableRect.h)) },
1682 SDL_WINDOW_ALWAYS_ON_TOP | 1686 SDL_WINDOW_ALWAYS_ON_TOP |
1683#if !defined (iPlatformAppleDesktop) 1687#if !defined (iPlatformAppleDesktop)
1684 SDL_WINDOW_BORDERLESS | 1688 SDL_WINDOW_BORDERLESS |