xenko icon indicating copy to clipboard operation
xenko copied to clipboard

Minimize game window.

Open dfkeenan opened this issue 7 years ago • 3 comments

When a game is full screen and the window is deactivated I believe the window should be minimized. I can not seem to do this for 2 reasons:

  • Activated & Deactivated events never fire. See #641 .
  • There does not appear to be a way to minimize the window.

dfkeenan avatar Nov 11 '17 08:11 dfkeenan

Any updates on minimizing? I went borderless for a sleeker feel but see no way to minimize either.

herocrab avatar Jan 13 '18 15:01 herocrab

Howdy guys, are 641 or 643 being looked at? I imagine there are implications for mobile/tablet games as well. I merely want a minimize feature :).

herocrab avatar Mar 04 '18 14:03 herocrab

@Jarmo-BWG Well, if you really want this feature to be implemented as soon as possible, you could implement it yourself and submit a pull request. The 7 files that you are going to have to touch are here.

Of those files, GameWindow.cs is the public API and the other ones are the platform specific window handlers.

For example, for the desktop GameWindow, you could add some code like this:

public override bool IsMinimized {
    get {
        if (form != null) {
            return form.WindowState == FormWindowState.Minimized;
        }                 
        return false;
    }
    //New code:
    set {
        if(value) {
            form.WindowState = FormWindowState.Minimized;
        } else {
            form.WindowState = FormWindowState.Maximized;
        }
    }
}

stefnotch avatar Mar 04 '18 18:03 stefnotch