From fae9f03cc91fc1cf9649fb18a34671c9774ce716 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 12 Dec 2021 16:29:37 +0100 Subject: X11 platform: account for GUI scaling in location of input method aux window. --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/drivers') 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); -- cgit v1.2.3