summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-12-12 16:29:37 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-12-12 16:29:48 +0100
commitfae9f03cc91fc1cf9649fb18a34671c9774ce716 (patch)
treedb7bd094a6d7e4a4599e4612211ab05914eae03b /src/drivers/Xlib
parent638ad499d0b8331ddaf121ae7ed5fda0b7dc2598 (diff)
X11 platform: account for GUI scaling in location of input method aux window.
Diffstat (limited to 'src/drivers/Xlib')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
index a96682554..1c6c2a6bc 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
@@ -174,9 +174,11 @@ void Fl_Xlib_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W,
if (fnt && must_free_fnt) free(fnt);
if (!change) return;
-
+ float s = scale();
+ XRectangle fl_spot_unscaled = { short(fl_spot.x * s), short(fl_spot.y * s),
+ (unsigned short)(fl_spot.width * s), (unsigned short)(fl_spot.height * s) };
preedit_attr = XVaCreateNestedList(0,
- XNSpotLocation, &fl_spot,
+ XNSpotLocation, &fl_spot_unscaled,
XNFontSet, fs, NULL);
XSetICValues(fl_xim_ic, XNPreeditAttributes, preedit_attr, NULL);
XFree(preedit_attr);