New issue
Advanced search Search tips

Issue 894082 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 11
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

RemoteMacViews: App shim is not hi-DPI compatible

Project Member Reported by ccameron@chromium.org, Oct 10

Issue description

When using RemoteMacViews, the app shim process seems to be running in some compatibility mode where it is unaware of hi-DPI screens.

In particular
- when querying monitor properties, a DPI of 1 is returned (even on retina screens)
- even parts of the UI that are drawn by the system (e.g, title bars) are non-retina (see attached screenshot)

I suspect that this has something to do with signaling to the system that the app is hi-DPI aware. I've tried manually editing the app shim's Info.plist to include the line
    <key>NSHighResolutionCapable</key>
    <true/>
Also of note is that this is at a different level than -[NSView setWantsBestResolutionOpenGLSurface:] -- this is affecting the reported DPI.

Any thoughts would be appreciated! This might be related to how we initialize the app shim process.

https://cs.chromium.org/chromium/src/chrome/app_shim/chrome_main_app_mode_mac.mm?rcl=4fe9842151c54039ede374aef75121a61051b479&l=606
 
Screen Shot 2018-10-09 at 4.22.44 PM.png
103 KB View Download
So ... NSHighResolutionCapable actually does work, not sure how I got that wrong!
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c51edbac43ca799026cb0abf24935ba75d663dc

commit 8c51edbac43ca799026cb0abf24935ba75d663dc
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Oct 11 00:42:23 2018

RemoteMacViews: Add high DPI support

Including the following lines
    <key>NSHighResolutionCapable</key>
    <true/>
in Info.plist is necessary for any high resolution support. If these
are not specified then even such calls as -[NSScreen backingScaleFactor]
will return 1.

Bug:  894082 
Change-Id: I3c145291fee6a254175e1a6ed685c17f947ecbde
Reviewed-on: https://chromium-review.googlesource.com/c/1274842
Commit-Queue: ccameron <ccameron@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598596}
[modify] https://crrev.com/8c51edbac43ca799026cb0abf24935ba75d663dc/chrome/browser/web_applications/components/web_app_shortcut_mac.mm
[modify] https://crrev.com/8c51edbac43ca799026cb0abf24935ba75d663dc/chrome/common/mac/app_mode_common.h
[modify] https://crrev.com/8c51edbac43ca799026cb0abf24935ba75d663dc/chrome/common/mac/app_mode_common.mm

Status: Fixed (was: Assigned)
Fixed ... though this will only be fixed for newly created app shims. Old apps' Info.plists are unchanged.

Sign in to add a comment