ubports / unity8

The operating environment for everywhere. Lomiri development has moved to https://gitlab.com/ubports/development/core/lomiri
https://lomiri.com/
GNU General Public License v3.0
723 stars 99 forks source link

Screen is "shaked" when opening the launcher while in full screen #208

Open lduboeuf opened 4 years ago

lduboeuf commented 4 years ago

Step to reproduce: Open a video or a photo in full screen, then swipe right to open the launcher : Video display area will move down and then up. Tested with Morph browser for video and Gallery for photos on Edge channel

[Edit]: The same behaviour is seen when switching to fullscreen for an application ( e.g: take youtube webapp, open a video in fullscreen, you will see that the video is shaked. )

UniversalSuperBox commented 4 years ago

This only appears to occur when dragging out the Drawer. This causes Unity8 to take focus from the running app, taking the shell out of full screen mode. Once the Drawer is dismissed, the app takes focus back.

UniversalSuperBox commented 4 years ago

This behavior was introduced aaaallllll the way back at https://github.com/ubports/unity8/commit/a20be01476f7ee86e039cd7df9e4a9dba71d16bb, where the Dash became an app. https://github.com/ubports/unity8/commit/a20be01476f7ee86e039cd7df9e4a9dba71d16bb#diff-a54a1698b32808661587b74b7e8ac356R463

lduboeuf commented 4 years ago

So as i understand, it is not an easy fix, is it ?

UniversalSuperBox commented 4 years ago

More like it's by design. When the Drawer is on-screen, the Panel (top bar) is supposed to show. I don't necessarily think that the app should be resized when this happens (indeed, in Unity 7 the available desktop area did not change).

We could make the AvailableDesktopArea in Shell.qml not follow the Panel, instead following the focused app. This would mean that you could not access the top of your app when the Panel is open for any reason... however, the only case where the Panel is visible but the app is fullscreen seems to be in this case.

UniversalSuperBox commented 4 years ago

It was pretty simple to get a basic fix for this. This patch makes the app not leave fullscreen until the Drawer is released, rather than when the user starts dragging it. Unfortunately, the app still leaves fullscreen. This incurs performance penalties and makes the app still "shake" after it's put back into place.

A more complete fix will need to account for apps becoming unfocused when the Shell is in use. Whenever the Drawer or Indicators are opened, the app loses focus and the "fullscreen" state is lost.

partialFix.patch.txt