GNOME Bugzilla – Bug 663096
Windows IME position is wrong when Aero glass is enabled
Last modified: 2018-05-02 15:15:46 UTC
The GTK+ Windows IME uses the Win32 function GetWindowRect to get the window position because the caret position it passes to ImmSetCandidateWindow must be relative to the window origin, not the client origin. However, on Vista/Win7, GetWindowRect doesn't return the correct value if DWM compositing (Aero Glass) is enabled. The correct value can be obtained using DwmGetWindowAttribute when DwmIsCompositionEnabled indicates that DWM is enabled.
Created attachment 248852 [details] [review]
I checked using that approach and the coordinates still turned out to be wrong. After reading the docs it seems that CFS_EXCLUDE seems a better deal for GTK+ as it
1) works on window relative coordinates, no need to transform to screen space
2) lets you specify a rectangle to render the preedit window around, very akin to gtk_im_context_set_cursor_location()
After some testing with several languages on IME, The patch seems to fix this issue consistently.
git am also applies the patch without complains on master
It works fine for me.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
I haven't verified, but checking the log it looks like this issue and patch still applies to master.
However, I don't seem to have permission to reopen.
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/374.