|
|
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. |
DescriptionFix 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 #Messages
Total messages: 52 (20 generated)
chris.coulson@canonical.com changed reviewers: + erg@chromium.org
On 2017/04/27 23:36:22, Chris Coulson wrote: Note, the last time I submitted something for review it was pointed out that my account is not part of the CCLA from Canonical. I'm still not sure who manages that internally (I'm trying to find out).
Description was changed from ========== 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 ========== to ========== 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 ==========
On 2017/04/27 23:43:31, Chris Coulson wrote: > On 2017/04/27 23:36:22, Chris Coulson wrote: > > Note, the last time I submitted something for review it was pointed out that my > account is not part of the CCLA from Canonical. I'm still not sure who manages > that internally (I'm trying to find out). The CCLA issue *should* be resolved now.
erg@chromium.org changed reviewers: + oshima@chromium.org
+oshima who actually understands dpi stuff lgtm, but oshima should also probably look at this since i'm not a dpi specialist.
thank you for fixing this! lgtm with one nit https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/... File chrome/browser/ui/libgtkui/gtk_ui.cc (right): https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/... chrome/browser/ui/libgtkui/gtk_ui.cc:328: float GetScaleFromDPI() { nit: GetScaleFromXftDPI
https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/... File chrome/browser/ui/libgtkui/gtk_ui.cc (right): https://codereview.chromium.org/2852593002/diff/1/chrome/browser/ui/libgtkui/... chrome/browser/ui/libgtkui/gtk_ui.cc:328: float GetScaleFromDPI() { On 2017/04/28 18:31:18, oshima wrote: > nit: GetScaleFromXftDPI > Acknowledged.
The CQ bit was checked by thomasanderson@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from erg@chromium.org, oshima@chromium.org Link to the patchset: https://codereview.chromium.org/2852593002/#ps20001 (title: "Rename GetScaleFromDPI to GetScaleFromXftDPI")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
The CQ bit was checked by oshima@google.com
The CQ bit was unchecked by oshima@google.com
The CQ bit was checked by oshima@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
pinging Chris, did you sign the CLA? I wouldn't want to ship Gtk3 without this, so we need to land this so it can be merged to M59.
On 2017/05/03 00:15:55, Tom Anderson wrote: > pinging Chris, did you sign the CLA? > > I wouldn't want to ship Gtk3 without this, so we need to land this so it can be > merged to M59. As far as I'm aware, I was added to the list of employees authorized to submit contributions on behalf of Canonical, which has signed the corporate CLA. If that hasn't actually happened yet, I'll chase it up today.
On 2017/05/03 08:57:09, Chris Coulson wrote: > On 2017/05/03 00:15:55, Tom Anderson wrote: > > pinging Chris, did you sign the CLA? > > > > I wouldn't want to ship Gtk3 without this, so we need to land this so it can > be > > merged to M59. > > As far as I'm aware, I was added to the list of employees authorized to submit > contributions on behalf of Canonical, which has signed the corporate CLA. If > that hasn't actually happened yet, I'll chase it up today. FWIW, canonical isn't listed in AUTHORS files. (not sure how/if it's linked to CLA though)
The CQ bit was checked by thomasanderson@google.com
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
On 2017/05/03 08:57:09, Chris Coulson wrote: > On 2017/05/03 00:15:55, Tom Anderson wrote: > > pinging Chris, did you sign the CLA? > > > > I wouldn't want to ship Gtk3 without this, so we need to land this so it can > be > > merged to M59. > > As far as I'm aware, I was added to the list of employees authorized to submit > contributions on behalf of Canonical, which has signed the corporate CLA. If > that hasn't actually happened yet, I'll chase it up today. So, I pinged someone on our legal team today, and I'm basically waiting on them to notify Google that I'm to be added to this list. Sorry about this, I didn't realize it would take so long :/
On 2017/05/03 19:35:38, Chris Coulson wrote: > On 2017/05/03 08:57:09, Chris Coulson wrote: > > On 2017/05/03 00:15:55, Tom Anderson wrote: > > > pinging Chris, did you sign the CLA? > > > > > > I wouldn't want to ship Gtk3 without this, so we need to land this so it can > > be > > > merged to M59. > > > > As far as I'm aware, I was added to the list of employees authorized to submit > > contributions on behalf of Canonical, which has signed the corporate CLA. If > > that hasn't actually happened yet, I'll chase it up today. > > So, I pinged someone on our legal team today, and I'm basically waiting on them > to notify Google that I'm to be added to this list. Sorry about this, I didn't > realize it would take so long :/ This has now been done.
The CQ bit was checked by thomasanderson@google.com
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
On 2017/05/05 15:33:43, 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. I verified internally that Canonical Limited signed the GCLA. It looks like the check is failing because Canonical isn't listed in the AUTHORS file. I've opened https://codereview.chromium.org/2860413002 to fix this.
On 2017/05/05 17:18:31, Elliot Glaysher wrote: > On 2017/05/05 15:33:43, 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. > > I verified internally that Canonical Limited signed the GCLA. It looks like the > check is failing because Canonical isn't listed in the AUTHORS file. I've opened > https://codereview.chromium.org/2860413002 to fix this. Thanks, and sorry this has ended up being such a pain.
On 2017/05/05 17:18:31, Elliot Glaysher wrote: > On 2017/05/05 15:33:43, 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. > > I verified internally that Canonical Limited signed the GCLA. It looks like the > check is failing because Canonical isn't listed in the AUTHORS file. I've opened > https://codereview.chromium.org/2860413002 to fix this. Thanks, and sorry this has ended up being such a pain.
On 2017/05/05 17:22:08, Chris Coulson wrote: > On 2017/05/05 17:18:31, Elliot Glaysher wrote: > > On 2017/05/05 15:33:43, 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. > > > > I verified internally that Canonical Limited signed the GCLA. It looks like > the > > check is failing because Canonical isn't listed in the AUTHORS file. I've > opened > > https://codereview.chromium.org/2860413002 to fix this. > > Thanks, and sorry this has ended up being such a pain. No, this part is our fault.
The CQ bit was checked by erg@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
The CQ bit was checked by erg@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
On 2017/05/05 18:25:26, 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. Hi, Can someone kick off commit-bot again? The AUTHORS patch landed 10 mins after the last time it ran here. Bad timing!! Cheers, John
The CQ bit was checked by oshima@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
The author chris.coulson@canonical.com has not signed Google Contributor License Agreement. Please visit https://cla.developers.google.com to sign and manage CLA.
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?
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. |