|
|
Created:
3 years, 7 months ago by Tom (Use chromium acct) 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
TBR=erg@chromium.org
patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001)
Review-Url: https://codereview.chromium.org/2869763004
Cr-Commit-Position: refs/heads/master@{#470142}
Committed: https://chromium.googlesource.com/chromium/src/+/3449c607560559da80f7ecc9c3e5b24440b9010c
Patch Set 1 #
Messages
Total messages: 19 (15 generated)
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 patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001) ========== 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 patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001) ==========
thomasanderson@google.com changed reviewers: + chris.coulson@canonical.com, erg@chromium.org
erg ptal This is copied from https://codereview.chromium.org/2852593002/
The CQ bit was checked by thomasanderson@google.com to run a CQ dry run
Dry run: 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
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by thomasanderson@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
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 patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001) ========== 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 TBR=erg@chromium.org patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001) ==========
thomasanderson@chromium.org changed reviewers: + thomasanderson@chromium.org
TBR'ing erg since he's OOO and the other CL already got approval lgtm from my chromium account
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
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...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1494279743458560, "parent_rev": "9d8a90f8a7f49c673bcd4e369efc84c62cc18285", "commit_rev": "3449c607560559da80f7ecc9c3e5b24440b9010c"}
Message was sent while issue was closed.
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 TBR=erg@chromium.org patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001) ========== 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 TBR=erg@chromium.org patch from issue 2852593002 at patchset 20001 (http://crrev.com/2852593002#ps20001) Review-Url: https://codereview.chromium.org/2869763004 Cr-Commit-Position: refs/heads/master@{#470142} Committed: https://chromium.googlesource.com/chromium/src/+/3449c607560559da80f7ecc9c3e5... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/3449c607560559da80f7ecc9c3e5... |