After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663096 - Windows IME position is wrong when Aero glass is enabled
Windows IME position is wrong when Aero glass is enabled
Product: gtk+
Classification: Platform
Component: Backend: Win32
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
Depends on:
Reported: 2011-10-31 12:38 UTC by Mikayla Hutchinson
Modified: 2018-05-02 15:15 UTC
See Also:
GNOME target: ---
GNOME version: ---

patch (2.17 KB, patch)
2013-07-10 17:14 UTC, Carlos Garnacho
none Details | Review

Description Mikayla Hutchinson 2011-10-31 12:38:22 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.

Comment 1 Carlos Garnacho 2013-07-10 17:14:47 UTC
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.
Comment 2 Carlos Garnacho 2013-07-10 17:21:56 UTC
git am also applies the patch without complains on master
Comment 3 Takuro Ashie 2013-07-12 11:39:11 UTC
It works fine for me.
Comment 4 Matthias Clasen 2018-02-10 05:04:30 UTC
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.
Comment 5 Mikayla Hutchinson 2018-02-10 06:10:45 UTC
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.
Comment 6 GNOME Infrastructure Team 2018-05-02 15:15:46 UTC
-- 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: