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

Get viewport maximization/mlnimization state #2332

Open
BenTalagan opened this issue May 20, 2024 · 0 comments
Open

Get viewport maximization/mlnimization state #2332

BenTalagan opened this issue May 20, 2024 · 0 comments
Labels
state: pending not addressed yet

Comments

@BenTalagan
Copy link

Is your feature request related to a problem? Please describe.

I find it hard (even impossible) to know if the main window/viewport is in maximized/minimized state with the current API.

Describe alternatives you've considered

  • Using get_viewport_pos gives the position of the viewport in the normal state. So it is a no go.
  • Using a boolean to remember the state is not sufficient, because the user can trigger maximization / minimization events from the OS directly so there's no chance to be informed of those events (except with a callback, but the API does not offer this possibility)

Describe the solution you'd like

Add some functions giving this information (e.g. ìs_viewport_maximized , is_viewport_minimized)
Maybe it's not to hard to implement, at least for MacOS and linux ? It looks like glfw offers solutions, I think, like :

int iconified = [glfwGetWindowAttrib](https://www.glfw.org/docs/3.3/group__window.html#gacccb29947ea4b16860ebef42c2cb9337)(window, [GLFW_ICONIFIED](https://www.glfw.org/docs/3.3/group__window.html#ga39d44b7c056e55e581355a92d240b58a));

(PS: Thank you for the hard work!)

@BenTalagan BenTalagan added the state: pending not addressed yet label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet
Projects
None yet
Development

No branches or pull requests

1 participant