Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows marked mir_window_state_fullscreen appear behind shell components #3274

Open
mattkae opened this issue Mar 7, 2024 · 10 comments
Open
Labels
bug triaged Triage into JIRA to plan it in

Comments

@mattkae
Copy link
Contributor

mattkae commented Mar 7, 2024

Repro

  • Have a few layer-shell components, like waybar
  • Set a window's state to mir_window_state_fullscreen
  • See that the window is behind waybar when it should be covering it
@Saviq
Copy link
Collaborator

Saviq commented Mar 7, 2024

See that the window is behind waybar when it should be covering it

Actually, I believe the top layer should be hidden when a fullscreen window is focused. This way if you Alt+Tab to a non-fullscreen window, you get the panel back.

And a fullscreen/maximized window can't be "always on top", so that seems to hold with the above.

@AlanGriffiths
Copy link
Contributor

Also note that shell components using layer-shell choose which layer to be in:

      <entry name="background" value="0"/>
      <entry name="bottom" value="1"/>
      <entry name="top" value="2"/>
      <entry name="overlay" value="3"/>

That might also need to be considered.

@mattkae
Copy link
Contributor Author

mattkae commented Mar 7, 2024

See that the window is behind waybar when it should be covering it

Actually, I believe the top layer should be hidden when a fullscreen window is focused. This way if you Alt+Tab to a non-fullscreen window, you get the panel back.

And a fullscreen/maximized window can't be "always on top", so that seems to hold with the above.

Would this be weird for transparent windows to suddenly not see the full attached view behind them? They would only see the other windows that are there, and none of the shell components

@Saviq
Copy link
Collaborator

Saviq commented Mar 7, 2024

Would this be weird for transparent windows to suddenly not see the full attached view behind them? They would only see the other windows that are there, and none of the shell components

Transparent fullscreen windows? Not on a layer? Sounds wrong :)

@mattkae
Copy link
Contributor Author

mattkae commented Mar 7, 2024

Transparent fullscreen windows? Not on a layer? Sounds wrong :)

I'm thinking maybe I want to fullscreen my terminal or something 🤔

@Saviq Saviq added the triaged Triage into JIRA to plan it in label Apr 10, 2024
@mattkae
Copy link
Contributor Author

mattkae commented Apr 18, 2024

The easiest thing here IMO is:

  • If we render a window on a layer AND it is fullscreen AND it is focused, then we don't render any window on the layers above that layer. That way, you get your true fullscreened-focused view

@AlanGriffiths
Copy link
Contributor

Isn't putting the panels into "bottom" the easiest thing to do?

@mattkae
Copy link
Contributor Author

mattkae commented Apr 19, 2024

Isn't putting the panels into "bottom" the easiest thing to do?

Wouldn't the idea of "fullscreen" in regards to certain panels in this case? e.g. I play a game that wants the full screen, but waybar (or something else) always shows on top of my game. In this case, waybar usually wants to be on top of everything else, but not when my game is running.

@RAOF
Copy link
Contributor

RAOF commented Apr 19, 2024

I think this is partially artifact of the lack of semantics in layer-shell, combined with some missing semantics in xdg-shell.

  • Panels usually want to be on top of everything
  • Fullscreen windows should take up the full screen
    • Panels should usually move out of the way of fullscreen windows
    • Panels might want to be accessible over the top of fullscreen windows by dragging from/mouseing to the edge of the display.
      • This is probably appropriate for eg: fullscreen media playback
      • This is probably inappropriate for eg: fullcreen games, where scrolling the view by moving the cursor to the edge of the screen is a common idiom.
  • You might want to allow notifications to appear above fullscreen windows

Some of this seems to be that we're not quite doing what existing protocols expect. For example, wlr-layer-shell says

Fullscreen shell surfaces are typically rendered at the top layer.

so we could just stack them there, and they'll stack over the panels (which alt-tab won't focus).

@mattkae
Copy link
Contributor Author

mattkae commented Apr 19, 2024

I agree with Chris. It would be appropriate for fullscreened windows to appear on the top layer so that they are above all panels, but below any overlays (e.g. the lockscreen).

However, you still may want to show a non-fullscreened app above a fullscreened app (e.g. I alt + tab away from my fullscreen game to check my chat app; I would expect my chat application to show above the game). For this reason, I believe that the fullscreened window should only be in the top level when it's also focused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triaged Triage into JIRA to plan it in
Projects
None yet
4 participants