Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Issue 2852593002: Fix DPI scaling on Linux with GTK3 (Closed)

Created:
3 years, 7 months ago by Chris Coulson
Modified:
3 years, 7 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix DPI scaling on Linux with GTK3 The device scale was determined by querying the value of the "gtk-xft-dpi" property from GtkSettings. In GTK2, this always returned the value of the "Xft/DPI" XSettings property. However, in GTK3, this returns the value of "Gdk/UnscaledDPI" if it is set, resulting in the wrong device scale being calculated on high DPI screens. Instead, we now query the "gdk-window-scaling-factor" setting from GdkScreen, which is derived from the value of the "Gdk/WindowScalingFactor" XSettings property. If this property is not set then we fall back to the previous code path, as environments that don't provide Gdk/WindowScalingFactor also won't provide Gdk/UnscaledDPI. BUG=716135

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rename GetScaleFromDPI to GetScaleFromXftDPI #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -6 lines) Patch
M chrome/browser/ui/libgtkui/gtk_ui.cc View 1 1 chunk +21 lines, -6 lines 0 comments Download

Messages

Total messages: 52 (20 generated)
Chris Coulson
3 years, 7 months ago (2017-04-27 23:36:22 UTC) #2
Chris Coulson
On 2017/04/27 23:36:22, Chris Coulson wrote: Note, the last time I submitted something for review ...
3 years, 7 months ago (2017-04-27 23:43:31 UTC) #3
Chris Coulson
On 2017/04/27 23:43:31, Chris Coulson wrote: > On 2017/04/27 23:36:22, Chris Coulson wrote: > > ...
3 years, 7 months ago (2017-04-28 16:27:49 UTC) #5
Elliot Glaysher
+oshima who actually understands dpi stuff lgtm, but oshima should also probably look at this ...
3 years, 7 months ago (2017-04-28 18:12:15 UTC) #7
oshima
thank you for fixing this! lgtm with one nit https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/gtk_ui.cc File chrome/browser/ui/libgtkui/gtk_ui.cc (right): https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/gtk_ui.cc#newcode328 chrome/browser/ui/libgtkui/gtk_ui.cc:328: ...
3 years, 7 months ago (2017-04-28 18:31:18 UTC) #8
Chris Coulson
https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/gtk_ui.cc File chrome/browser/ui/libgtkui/gtk_ui.cc (right): https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/gtk_ui.cc#newcode328 chrome/browser/ui/libgtkui/gtk_ui.cc:328: float GetScaleFromDPI() { On 2017/04/28 18:31:18, oshima wrote: > ...
3 years, 7 months ago (2017-04-28 18:40:50 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-01 05:43:22 UTC) #12
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-01 05:43:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-01 17:41:53 UTC) #18
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-01 17:41:55 UTC) #20
Tom (Use chromium acct)
pinging Chris, did you sign the CLA? I wouldn't want to ship Gtk3 without this, ...
3 years, 7 months ago (2017-05-03 00:15:55 UTC) #21
Chris Coulson
On 2017/05/03 00:15:55, Tom Anderson wrote: > pinging Chris, did you sign the CLA? > ...
3 years, 7 months ago (2017-05-03 08:57:09 UTC) #22
oshima_google
On 2017/05/03 08:57:09, Chris Coulson wrote: > On 2017/05/03 00:15:55, Tom Anderson wrote: > > ...
3 years, 7 months ago (2017-05-03 14:16:59 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-03 17:31:17 UTC) #25
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-03 17:31:19 UTC) #27
Chris Coulson
On 2017/05/03 08:57:09, Chris Coulson wrote: > On 2017/05/03 00:15:55, Tom Anderson wrote: > > ...
3 years, 7 months ago (2017-05-03 19:35:38 UTC) #28
Chris Coulson
On 2017/05/03 19:35:38, Chris Coulson wrote: > On 2017/05/03 08:57:09, Chris Coulson wrote: > > ...
3 years, 7 months ago (2017-05-05 13:33:44 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-05 15:33:41 UTC) #31
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-05 15:33:43 UTC) #33
Elliot Glaysher
On 2017/05/05 15:33:43, commit-bot: I haz the power wrote: > The author mailto:chris.coulson@canonical.com has not ...
3 years, 7 months ago (2017-05-05 17:18:31 UTC) #34
Chris Coulson
On 2017/05/05 17:18:31, Elliot Glaysher wrote: > On 2017/05/05 15:33:43, commit-bot: I haz the power ...
3 years, 7 months ago (2017-05-05 17:22:07 UTC) #35
Chris Coulson
On 2017/05/05 17:18:31, Elliot Glaysher wrote: > On 2017/05/05 15:33:43, commit-bot: I haz the power ...
3 years, 7 months ago (2017-05-05 17:22:08 UTC) #36
Elliot Glaysher
On 2017/05/05 17:22:08, Chris Coulson wrote: > On 2017/05/05 17:18:31, Elliot Glaysher wrote: > > ...
3 years, 7 months ago (2017-05-05 17:22:37 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-05 18:13:03 UTC) #39
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-05 18:13:05 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-05 18:25:20 UTC) #43
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-05 18:25:26 UTC) #45
johnf
On 2017/05/05 18:25:26, commit-bot: I haz the power wrote: > The author mailto:chris.coulson@canonical.com has not ...
3 years, 7 months ago (2017-05-08 09:13:51 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852593002/20001
3 years, 7 months ago (2017-05-08 09:58:05 UTC) #48
commit-bot: I haz the power
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign ...
3 years, 7 months ago (2017-05-08 09:58:07 UTC) #50
oshima
On 2017/05/08 09:58:07, commit-bot: I haz the power wrote: > The author mailto:chris.coulson@canonical.com has not ...
3 years, 7 months ago (2017-05-12 00:34:04 UTC) #51
oshima
3 years, 7 months ago (2017-05-12 00:35:00 UTC) #52
On 2017/05/12 00:34:04, oshima wrote:
> On 2017/05/08 09:58:07, commit-bot: I haz the power wrote:
> > The author mailto:chris.coulson@canonical.com has not signed Google
> Contributor License
> > Agreement. Please visit https://cla.developers.google.com to sign and manage
> > CLA.
> 
> erg@, would you mind if I land this instead for now?

Ah, nvm. thomasanderson@ did it already.

Powered by Google App Engine
This is Rietveld 408576698