Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 475718 The coordinates send to input method on Hi-DPI Linux environment are not scaled
Starred by 9 users Reported by wen...@gmail.com, Apr 9 2015 Back to list
Status: Fixed
Owner:
Closed: Feb 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocked on:
issue 360334



Sign in to add a comment
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.10 Safari/537.36

Steps to reproduce the problem:
1. Use input method under linux
2. Type anything that will trigger a input method window

What is the expected behavior?
The popup input method window is shown at the cursor's position.

What went wrong?
After some simple test, seems the coordinates send to input method is not scaled together with DPI, on my (single) screen setup with 228 DPI, the popup input method window's X and Y coordinates are always about half of the correct value.

Did this work before? N/A 

Chrome version: 43.0.2357.10  Channel: dev
OS Version: 3.19
Flash Version: Shockwave Flash 17.0 r0
 
Cc: brajkumar@chromium.org
Labels: Needs-Feedback
wengxt@ - Could you please provide the screen cast for this issue including any sample file or URL if there, So that we can check the issue from our end and will help you further.
Thanks!
Comment 2 by wen...@gmail.com, Apr 12 2015
Because any page can reproduce this bug, I just randomly picked one.

As you can see, when I type in the input box, the input box should appear at the cursor's position.

I also tried to change the cursor's position in the video, and you can see the popup window moved about half of the cursor movemoent (probably because scale factor is 2).
chrome-bug-demo.webm
2.9 MB Download
Comment 3 by tkent@chromium.org, Apr 13 2015
Labels: Cr-UI-Input-Text-IME
Comment 4 by a...@chromium.org, Nov 4 2015
Cc: a...@chromium.org
wengxt@: Could you please confirm if this is still an issue on the latest stable(46.0.2490.80) as well. If yes, please let us know the User configuration set under 'Input method configuration' dialog.


Cc: shchen@chromium.org osh...@chromium.org
CC-ing more folks who would be interested in.
Cc: -shchen@chromium.org shuchen@chromium.org
Oops, fixed a typo in the address.
Comment 7 by wen...@gmail.com, Nov 7 2015
The problem still exists.

But where's the 'Input method configuration' dialog?
Cc: rnimmagadda@chromium.org
@wengxt: Could you please check the attached video for the 'Input Method Configuration' and update us your settings.

Thank you.
475718.ogv
2.9 MB Download
Comment 9 by wen...@gmail.com, Jan 14 2016
That's only for debian/ubuntu and it's only used for setting input method environment variables and I don't use ubuntu.

I develop and use fcitx, BTW.
Please check if the coordinates passed to gtk_im_context_set_cursor_location it is scaled with dpi.
Owner: shuchen@chromium.org
Status: Assigned
Looks like the  issue 360334  is related to this. I can do the investigation.


wengxt@, is it possible for you to try the latest Chrome code on Linux?

In M49, there is a flag --enable-use-zoom-for-dsf.
I'm wondering whether this issue can still repro with the flag enabled.

Btw, how to change the DPI setting on Ubuntu?
Comment 12 by wen...@gmail.com, Jan 14 2016
#11

Just tested, it doesn't change anything on this issue.

I don't know about ubuntu, but theoratically using xrdb change value of Xft.dpi and use xrandr --dpi would work.
Comment 13 by ivan@ludios.org, Aug 14 2016
This still affects Chrome 54.0.2824.0 dev (tested on Ubuntu 16.04) and makes Chrome+Linux+hidpi not very useful for entering Japanese or Chinese text.
Hi guys

I faced the same issue on Chrome 54.0.2837.0 dev (tested on Arch Linux) with uim-mozc and fcitx-mozc.
The DPI is configured 144 and my display resolution is WQHD(2560x1440)
 Issue 616124  has been merged into this issue.
Cc: thomasanderson@chromium.org
Same Issue with chrome 55.0.2883.75 on manjaro linux with fcitx-sogoupinyin.
A 3200x1800 display with DPI=200
Blockedon: 360334
I haven't correctly set/changed my Goobuntu screen DPI, which has been blocking the fix for this issue. Can anyone help? Thanks.


$ xdpyinfo | grep -B2 dots
screen #0:
  dimensions:    1920x1200 pixels (338x211 millimeters)
  resolution:    96x96 dots per inch

$ xrandr --dpi 48
<now the screen flashed once, but the dpi/fonts seemed no change. However, the xdpyinfo reported 48x48 dots per inch>.


$ xrandr --dpi 192
$ echo 'Xft.dpi: 192' | xrdb -override

This doesn't seem to affect already-open windows, so please start new programs to see the effect.

Not sure if something in Ubuntu may change it back silently.
Thanks for your instructions. But it doesn't work for me. :-(

I don't think you have to change DPI to see this bug in action; you can just start Chrome with --force-device-scale-factor=1.5 for example.

The place to change your DPI settings will depend on the desktop environment.  In XFCE4, it's xfce4-settings-manager -> Appearance -> Fonts -> DPI -> Custom DPI setting

In GNOME 3, it might be gnome-tweak-tool -> Windows -> HiDPI -> Window scaling -> 2
Status: Started
Thanks ivan@, --force-device-scale-factor=1.5 works perfectly for me.

I'm now working on the fix.

Project Member Comment 25 by bugdroid1@chromium.org, Feb 22
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da4307a16fe8c0bbecc8158e21ffef8190e23623

commit da4307a16fe8c0bbecc8158e21ffef8190e23623
Author: shuchen <shuchen@chromium.org>
Date: Wed Feb 22 10:38:44 2017

Use the physical-pixel space for native IME on linux platform.

What's more, this cl makes a clear spec for the coordinates system in
ui::TextInputClient.

BUG= 475718 , 360334 

Review-Url: https://codereview.chromium.org/2593323002
Cr-Commit-Position: refs/heads/master@{#451980}

[modify] https://crrev.com/da4307a16fe8c0bbecc8158e21ffef8190e23623/chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.cc
[modify] https://crrev.com/da4307a16fe8c0bbecc8158e21ffef8190e23623/ui/base/ime/text_input_client.h

Status: Fixed
Sign in to add a comment