Copy link to clipboard
Copied
We have a multi-window Flex app which uses requestedDisplayResolution=high.
When a native window of the app is moved from one monitor to another monitor with a
different display-scaling, all contents of all windows will scale, instead of only
the contents of the window which was moved.
Is there any workaround for this issue?
Can this issue be considered as a bug?
I have thought of a self-made solution by checking the contentsScaleFactor (and working with that as scale) for each window but unfortunately, this property of the stage seems to only be able to have one value, which seems to be the value of the stage of last Window which was moved from montitor to monitor.
Copy link to clipboard
Copied
What's your scaleMode? noScale will give you more options to deal with that behavior.
Copy link to clipboard
Copied
[EDIT: Just saw, that the same issue is already reported here: Problems with AIR windows in multi-monitor setup with different font scaling ]
The scaleMode is noScale.
Another issue related to this is, that it is actually not possible to get the real resolution of the screen a window is located at; stage.stageWidth gives a scaled/modified value based on the display zoom factor, which is set in Windows, in combination with stage.contentsScaleFactor only considering "last" window.
Example:
Monitor 1: 3840 x 2160px, 150% Scale
Monitor 2: 1920 x 1080px, 100% Scale
Window 1 on Monitor 1 initially reports stage.contentsScaleFactor = 1.5, which is correct.
Window 2 is created on Monitor 2, reporting stage.contentsScaleFactor = 1, which is also correct - however, Window 1 now also reports contentsScaleFactor = 1, which is not correct.
Copy link to clipboard
Copied
I did a quick testing in AIR 18 and AIR 28 with an empty project that creates nativewindows with a simple text in them and default nativewindowinitoptions. I'm on MAC with double retina screens, tried a bunch of dimension, all scalemodes and my texts never changed. Do you have a simple way to reproduce that or does it only happen with huge resolution?
Copy link to clipboard
Copied
I assume the problem described here is due to Windows 10 adding the option to set a different font scaling per screen. Not sure if that is also possible on Mac OS. So this probably has to be resolved in Air, if right now only one contentsScaleFactor is available on the Stage object. (Or alternatively with an ANE)
Maybe there is a manual workaround though, I remember having a similar problem with OpenOffice, so maybe this works for you. There is an option to disable the auto scaling for the application:
Open Office calc looks different with Windows 10 - Microsoft Community
Copy link to clipboard
Copied
I've never run into that but I can guess a workaround where nativewindow scale is saved, they all use a container on top of their stage and scale change is monitored, if scale changes and is different than the one saved for each window then each window adjust the scale of their top container.
Copy link to clipboard
Copied
Since AIR 22
Flash Player and AIR 22 Release Notes
you can add
< requestedDisplayResolution >high< /requestedDisplayResolution >
and
stage.contentsScaleFactor
AIR content scales according to the value of stage.contentsScaleFactor. Where, the value of stage.contentsScaleFactor would be calculated as
stage.contentsScaleFactor = Current DPI / DPI at 100% (The DPI at 100% for Windows is 96 by default)
However, some of the content on Windows would scale only after the user signs-off and then signs-in again, as prompted by the OS.In the case where an extended screen is connected, the AIR app would adjust according to the DPI level of the particular screen, where each screen can have its independent DPI level. Hhigh quality renderings will cover the Stage3D content, vector assets and text, whereas high-resolution bitmap assets will have to be provided by the developer.
The Stage3D back buffer needs to be configured to the high resolution back buffer which can be done by calling Context3D.configureBackBuffer with the wantsBestResolution parameter set to 'true'.
The number of Screen pixels for the content will be ActionScript side Flash Pixels * Contents Scale Factor * Contents Scale Factor
Each Window should be its own NativeWindow and so has its own Stage
see the logic of Scaling and centering an interface
Supporting the multiple screen sizes of multiple devices in Adobe AIR | Adobe Developer Connection
eg.
windowObj.stage.scale = value
Copy link to clipboard
Copied
Like I described above, this seems to be not working properly.
stage.contentsScaleFactor can only have one value. It will always be the same for each window no matter what the real screen/display scaling is. I will create a bug report on this and post the link here
EDIT:
Link to Bug Report for voting:
Tracker (tracker.adobe.com/#/view/AIR-4198669)
Copy link to clipboard
Copied
Thanks for creating the bug report. Voted.
Copy link to clipboard
Copied
yeah you're saying it does not work but there is no code
I'm pretty sure your bug report will be better with a small code sample to demo the error
and not setting up the AIR app xml with the "requestedDisplayResolution"
would have unexpected results, but again you didn't say if you were doing that or not
also providing the version of Windows where this happen would probably help
Copy link to clipboard
Copied
The error is simple to reproduce if you have a windows 10 laptop and an external 4k monitor. Just drag the application window from one screen to another and you will see flickering of the windows size as AIR tries to mach the screen DPI.
Copy link to clipboard
Copied
Unfortunately, the latest Adobe AIR 31, with the new ScreenMode API, doesn't fix this issue 😞
The bug is still present.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now