From fbb0ddc8d1438721debeb471ce601ebceca3200a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= jaakko.keranen@iki.fi
Date: Mon, 9 May 2022 14:38:13 +0300
Subject: [PATCH 1/1] Terminal: Ignore LAGRANGE_OVERRIDE_DPI; disable popup
menus
src/ui/util.c | 2 +-
src/ui/window.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ui/util.c b/src/ui/util.c
index 55fd2df5..4da0a597 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1197,7 +1197,7 @@ void openMenuFlags_Widget(iWidget *d, iInt2 windowCoord, int menuOpenFlags) {
}
}
}
-#if defined (LAGRANGE_ENABLE_POPUP_MENUS)
+#if defined (LAGRANGE_ENABLE_POPUP_MENUS) && !defined (iPlatformTerminal)
/* Determine total display bounds where the popup may appear. */
iRect displayRect = zero_Rect();
for (int i = 0; i < SDL_GetNumVideoDisplays(); i++) {
diff --git a/src/ui/window.c b/src/ui/window.c
index 7b11684e..82d3a0cd 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -316,6 +316,7 @@ float displayDensity_Android(void);
#endif
static float displayScale_Window_(const iWindow *d) {
+#if !defined (iPlatformTerminal)
/* The environment variable LAGRANGE_OVERRIDE_DPI can be used to override the automatic
display DPI detection. If not set, or is an empty string, ignore it.
Note: the same value used for all displays. */
@@ -333,6 +334,7 @@ static float displayScale_Window_(const iWindow *d) {
LAGRANGE_OVERRIDE_DPI with the empty string. */
setenv("LAGRANGE_OVERRIDE_DPI", "", 1);
}
+#endif
#if defined (iPlatformApple) || defined (iPlatformTerminal)
iUnused(d);
/* Apple UI sizes are fixed and only scaled by pixel ratio. */
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).