Forum Discussion
micku7zu
Sep 22, 2021Copper Contributor
FLAG_LAYOUT_NO_LIMITS it is not respected on one screen mode
The https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_LAYOUT_NO_LIMITS is not respected on one screen mode on real device and emulator. This was r...
Craig_Dunn
Microsoft
Sep 27, 2021micku7zu thanks for the additional info - from what I understand this is the same issue we discussed on Twitter but with a different repro? Adding the GitHub link so that all the relevant info is here:
https://github.com/micku7zu/SurfaceDuoDispathGestureBug
I downloaded Quick Cursor app (great idea BTW) and noticed that in 1.11.3 you've listed a Surface Duo bug as fixed (Sep 21, 2021). Since this post is from Sep 22, it seems like there are still issues with FLAG_LAYOUT_NO_LIMITS though? To confirm: the cursor tracking part seems to work on both dual-screen and both single-screens, however the click target is wrong when it's only the right screen that's active?
micku7zu
Sep 27, 2021Copper Contributor
The changelog from Quick Cursor refers to some other bug (my resizing algorithm), not related to any of the discussions I opened here.
This bug with FLAG_LAYOUT_NO_LIMITS was not discussed on Twitter, it is something new that some user reported after I've talked with you about the other bug: https://techcommunity.microsoft.com/t5/surface-duo-sdk/display-screen-fold-info-from-accessibility-service/td-p/2771829
None of this bugs can be fixed in the app, from my current Android knowledge.
The FLAG_LAYOUT_NO_LIMITS issue can be reproduced easily in Quick Cursor:
1. Enable Quick Cursor -> Settings -> Debug -> Visual Debug
2. Move the tracker outside the screen with the screens open
3. Move the tracker outside the screen with only one screen active
You will see that the blue rectangle under the tracker (a view attached directly to Window Manager with FLAG_LAYOUT_NO_LIMITS) is restricted inside window limits when one screen is active. This should not happen according to the Android Documentation.
Or just do a sample app and attach a view to Window Manager outside the screen coordinates, it should work with the flag but it doesn't.
This bug with FLAG_LAYOUT_NO_LIMITS was not discussed on Twitter, it is something new that some user reported after I've talked with you about the other bug: https://techcommunity.microsoft.com/t5/surface-duo-sdk/display-screen-fold-info-from-accessibility-service/td-p/2771829
None of this bugs can be fixed in the app, from my current Android knowledge.
The FLAG_LAYOUT_NO_LIMITS issue can be reproduced easily in Quick Cursor:
1. Enable Quick Cursor -> Settings -> Debug -> Visual Debug
2. Move the tracker outside the screen with the screens open
3. Move the tracker outside the screen with only one screen active
You will see that the blue rectangle under the tracker (a view attached directly to Window Manager with FLAG_LAYOUT_NO_LIMITS) is restricted inside window limits when one screen is active. This should not happen according to the Android Documentation.
Or just do a sample app and attach a view to Window Manager outside the screen coordinates, it should work with the flag but it doesn't.