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

Issue 2937623006: Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor (Closed)

Created:
3 years, 6 months ago by Tom Anderson
Modified:
3 years, 6 months ago
CC:
chromium-reviews, oshima
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757, 732440 R=erg@chromium.org,thestig@chromium.org CC=oshima@chromium.org Review-Url: https://codereview.chromium.org/2937623006 Cr-Commit-Position: refs/heads/master@{#480167} Committed: https://chromium.googlesource.com/chromium/src/+/b50cab37a165f1f11d9a046d7f3367e4a563a73f

Patch Set 1 #

Patch Set 2 : update expected deps #

Total comments: 4

Patch Set 3 : simplify #

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

Messages

Total messages: 24 (15 generated)
Tom Anderson
erg ptal. why does dpi have to be so hard :( +thestig for deps changes
3 years, 6 months ago (2017-06-16 00:25:03 UTC) #11
Lei Zhang
deps update lgtm https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgtkui/gtk_ui.cc File chrome/browser/ui/libgtkui/gtk_ui.cc (left): https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgtkui/gtk_ui.cc#oldcode342 chrome/browser/ui/libgtkui/gtk_ui.cc:342: g_object_get(gtk_settings, "gtk-xft-dpi", &gtk_dpi, nullptr); Does the ...
3 years, 6 months ago (2017-06-16 00:53:13 UTC) #13
Tom Anderson
https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgtkui/gtk_ui.cc File chrome/browser/ui/libgtkui/gtk_ui.cc (left): https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgtkui/gtk_ui.cc#oldcode342 chrome/browser/ui/libgtkui/gtk_ui.cc:342: g_object_get(gtk_settings, "gtk-xft-dpi", &gtk_dpi, nullptr); On 2017/06/16 00:53:13, Lei Zhang ...
3 years, 6 months ago (2017-06-16 19:50:18 UTC) #14
Elliot Glaysher
owners lgtm (but once again, i know nothing about dpi...)
3 years, 6 months ago (2017-06-16 20:01:30 UTC) #15
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/2937623006/60001
3 years, 6 months ago (2017-06-16 20:04:16 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:60001) as https://chromium.googlesource.com/chromium/src/+/b50cab37a165f1f11d9a046d7f3367e4a563a73f
3 years, 6 months ago (2017-06-16 21:09:17 UTC) #21
Lei Zhang
Hey, where did the deps changes go in the latest patch set? Tree's red now.
3 years, 6 months ago (2017-06-16 22:00:27 UTC) #22
Lei Zhang
https://codereview.chromium.org/2944703003
3 years, 6 months ago (2017-06-16 22:03:42 UTC) #23
Tom Anderson
3 years, 6 months ago (2017-06-16 22:42:14 UTC) #24
Message was sent while issue was closed.
On 2017/06/16 22:03:42, Lei Zhang wrote:
> https://codereview.chromium.org/2944703003

oops. don't know how that got removed.  thanks for the cl!

Powered by Google App Engine
This is Rietveld 408576698