Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 356bc377 authored by Albert Chaulk's avatar Albert Chaulk
Browse files

Check if a visible layer exists instead of an invisible layer exists

Multiple layers may exist at index 0 and what we really want to know
is if any of them are active, not if any aren't.

Bug: 36867186, 36036583
Test: Launch ithaca then youtube
Change-Id: I5881a838c7df8670fa42eece558717140d4cb021
parent 5db4c0c5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -361,10 +361,10 @@ void DisplayService::NotifyDisplayConfigurationUpdate() {
}
}


int DisplayService::IsVrAppRunning(pdx::Message& message) {
int DisplayService::IsVrAppRunning(pdx::Message& message) {
  bool visible = true;
  bool visible = false;
  ForEachDisplaySurface([&visible](const std::shared_ptr<DisplaySurface>& surface) {
  ForEachDisplaySurface([&visible](const std::shared_ptr<DisplaySurface>& surface) {
    if (surface->client_z_order() == 0 && !surface->IsVisible())
    if (surface->client_z_order() == 0 && surface->IsVisible())
      visible = false;
      visible = true;
  });
  });


  REPLY_SUCCESS_RETURN(message, visible, 0);
  REPLY_SUCCESS_RETURN(message, visible, 0);