-
Notifications
You must be signed in to change notification settings - Fork 914
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
Window::set_minimized (#985) #990
Conversation
Co-Authored-By: Victor Berger <[email protected]>
On the Windows implementation do we want to create a |
@SuperiorJT We should track that in |
@SuperiorJT What is the status on this PR? |
Implementations are made for windows, macOS and wayland. We need someone to develop the x11 and iOS (if applicable) implementation since I am unable to. Once all is implemented, then I can go through and fmt and update required documentation. |
I have an implementation for X11 ready: https://github.com/murarth/winit/tree/x11-set-minimize |
# Conflicts: # src/platform_impl/emscripten/mod.rs # src/platform_impl/linux/mod.rs # src/platform_impl/windows/event_loop.rs
I added @murarth's X11 implementation, formatted, and added documentation. It's ready for review. |
pub fn set_minimized(&self, _minimized: bool) { | ||
unimplemented!() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this to panic or should it be a no-op? set_maximized
below is a no-op.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it particularly matters, since the Android backend doesn't even compile right now.
I've tested this out on Windows, and this seems to cause glitches if you do the following:
If you do that, the minimize button in the window's titlebar has the window restore icon instead of the window minimize icon, and fails to minimize the window when pressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works smoothly on macOS
I've fixed the maximize issue. Windows didn't like the window styles being set after minimization. Let me know if you find any more issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It no-op'd as expected with i3, which doesn't support minimizing. I'm going to kick the bucket to @murarth who I'm guessing has a gnome/KDE/etc setup lying around.
@goddessfreya I wrote the X11 implementation myself, so I can confirm it works. If we want to ping our X11 testers to get another set of eyes on it, that's fine by me. |
@murarth Haha, I'm ever so slightly blind. I see. Did you test for weird behavior evolving fullscreened/unmapped windows? Should be good to go on the X11 side, I don't see much that could go wrong. |
@goddessfreya I've tested for any weird interactions and found none. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows changes look good. Could you add stub implementations for WASM? Once that's done, this should be good to merge.
I added the stub for WASM. Let me know if I missed anything. |
Gets started on supporting
Window::set_minimized
(#985, #983). I'm very new to this repo and a beginner in Rust so it might not be exactly how you guys want it. I've tested it on macOS via keyboard events and was able to make it minimize similar to other macOS applications. I'm willing to work on the Windows side of this as well.cargo fmt
has been run on this branchCHANGELOG.md
if knowledge of this change could be valuable to users