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

Improve documentation around "visibility" and "occlusion" #2939

Open
daxpedda opened this issue Jul 9, 2023 · 1 comment
Open

Improve documentation around "visibility" and "occlusion" #2939

daxpedda opened this issue Jul 9, 2023 · 1 comment
Labels
C - needs discussion Direction must be ironed out S - docs Awareness, docs, examples, etc.

Comments

@daxpedda
Copy link
Member

daxpedda commented Jul 9, 2023

WindowEvent::Occluded says:

This is different to window visibility as it depends on whether the window is closed, minimised, set invisible, or fully occluded by another window.

Window::is_visible() says:

Gets the window's current visibility state.

Even though WindowEvent::Occluded differentiates itself from "window visibility", "window visibility" itself is not really explained anywhere. Probably the mention of "set invisible" in Occluded doesn't help either.

@daxpedda daxpedda added S - docs Awareness, docs, examples, etc. C - needs discussion Direction must be ironed out labels Jul 9, 2023
@daxpedda
Copy link
Member Author

There was a brief discussion in IRC about adding a Window::is_occluded(), but I'm really not sure this makes sense because of the ambiguity around "Window::is_visible()`.

Additionally with #2929, we have another ambiguity: WindowState, if the window is minimized, is it also Occluded? I'm just not sure if it makes sense to split up like that.


Just some quick not really thought through suggestion:

Maybe WindowState should also include "window visibility" and maybe we should also remove is_maximized() and all these other methods and just expose Window::window_state(), then we could have one event: WindowEvent::Configured that handles all states and one method Window::window_state() that can query all of them as well (maybe Window::set_window_state() as well?).

The WindowEvent::Occluded event should always fire if the window isn't visible, and with visible I mean if the user can see the window or not, period. Then a Window::is_occluded() makes sense and would also be true if minimized or doesn't have "window visibility".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out S - docs Awareness, docs, examples, etc.
Development

No branches or pull requests

1 participant