[Libreoffice-bugs] [Bug 140207] Qt's ImCursorRectangle is not correctly take device scale factor into account

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Feb 15 06:41:39 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140207

Michael Weghorn <m.weghorn at posteo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEEDINFO
     Ever confirmed|0                           |1
                 CC|                            |m.weghorn at posteo.de

--- Comment #1 from Michael Weghorn <m.weghorn at posteo.de> ---
(In reply to Xuetian Weng from comment #0)
> For regular Qt application, the ImCursorRectangle value returned by
> inputMethodQuery is scaled with the corresponding QWindow's device scale
> factor.
> 
> But libreoffice returns the non-scaled value which confuses the input method
> and send the non-native coordinates.
> 
> To be more concrete, this is how the coordinates being transformed by fcitx:
> (fcitx is expected to receive the native pixel value from application)
> 
> https://github.com/fcitx/fcitx5-qt/blob/
> cb48a057e1bcb0961a9eaaf12dda73f164b98b0c/qt5/platforminputcontext/
> qfcitxplatforminputcontext.cpp#L413
> 
> As you can see, the coordinates is up-scaled based on the input window's
> device pixel ratio then sent to input method server. But libreoffice set the
> non-scale value here, which makes it scaled wrongly in this code.

Thanks for your report and explanation on what's happening. Can you give
specific steps on how one can reproduce that something behaves in a wrong way
(description of steps to take, expected vs. actual behaviour)?

In case you already know how to fix the issue: We're happy to review and accept
patches. :-)
https://wiki.documentfoundation.org/Development/GetInvolved

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210215/ca8e54eb/attachment.htm>


More information about the Libreoffice-bugs mailing list