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

Add ability to make window unminimizable #93861

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

programneer
Copy link
Contributor

@programneer programneer commented Jul 2, 2024

Closes godotengine/godot-proposals#10092 and #37377

It seems no one else implemented this before so i made myself.
This PR allows the window to hide minimize button (but you can still minimize using MODE_MINIMIZED).

As an bonus, make the editor subwindows to behave the same as single_window_mode (only hide minimize button).

Due to not having an Mac device to test, it will be draft until it's done.

Preview

From old version where it hides both minimize and maximize buttons.

Linux

minimizable-linux

Windows

minimizable-windows

TODO

  • Test on macOS

@AThousandShips AThousandShips added this to the 4.x milestone Jul 2, 2024
@AThousandShips AThousandShips changed the title Add ability to make window to be unminiaturizable Add ability to make window unminiaturizable Jul 2, 2024
@bruvzg bruvzg self-requested a review July 2, 2024 11:30
@KoBeWi
Copy link
Member

KoBeWi commented Jul 2, 2024

Sounds like it solves #37377 if we make it enabled by default in editor dialogs.

EDIT:
Although not in the current form. I tested it on Windows, unresizable disables maximize button, unminiaturizable has no effect in itself. If you enable both flags, maximize and minimize buttons disappear, which is the old behavior. It's pointless like this.

It would be nice if there was a way to hide both buttons separately from making the window unresizable, i.e. allow window to be resizable, but not maximized and minimized.

EDIT2:
So I checked the old behavior and it doesn't work like I remembered. Unresizable does not hide the buttons 🤔

@passivestar
Copy link
Contributor

Tested on mac, it disables the minimize and maximize buttons

so

But it also makes every popup unresizable which is a problem

@AThousandShips
Copy link
Member

I'd say it should be unminimizable, I don't think we use the term miniaturize anywhere

@programneer programneer changed the title Add ability to make window unminiaturizable Add ability to make window unminimizable Jul 2, 2024
@programneer programneer force-pushed the unminiaturizable branch 4 times, most recently from 8b50c38 to 9afecc4 Compare July 2, 2024 14:57
servers/display_server.h Outdated Show resolved Hide resolved
servers/display_server.h Outdated Show resolved Hide resolved
scene/main/window.h Outdated Show resolved Hide resolved
doc/classes/Window.xml Outdated Show resolved Hide resolved
@programneer programneer force-pushed the unminiaturizable branch 4 times, most recently from 83daff9 to 49f2e28 Compare July 4, 2024 06:58
@programneer programneer force-pushed the unminiaturizable branch 4 times, most recently from 44ac341 to 91f5242 Compare July 4, 2024 07:22
As an bonus, make the editor subwindows to behave the same as single_window_mode (only hide minimize button).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to make window unminimizable
6 participants