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

Application crashes/fails when full screen and you move another windows app on top of it #8114

Open
2 tasks done
SteveReddoch opened this issue Dec 27, 2023 · 0 comments
Open
2 tasks done

Comments

@SteveReddoch
Copy link

Prerequisites

  • I have verified this issue is present in the develop branch
  • I have searched open and closed issues to ensure it has not already been reported.

MonoGame Version

Monogame 3.8.1.303

Which MonoGame platform are you using?

MonoGame Windows Desktop Application (mgwindowsdx)

Operating System

Windows 11

Description

When monogame is in full screen in a DirectX project, and you move a window ontop of that full-screen monogame, it will crash and not recover.

Steps to Reproduce

I created a fresh MONOGAME app using Visual Studio 2022. Total fresh, from scratch.

This is all I changed:
public Game1()
{
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = “Content”;
IsMouseVisible = true;
_graphics.PreferredBackBufferWidth = 2560;
_graphics.PreferredBackBufferHeight = 1440;
Window.IsBorderless = true;
_graphics.IsFullScreen = true;
_graphics.HardwareModeSwitch = true;
_graphics.SynchronizeWithVerticalRetrace = true;
_graphics.ApplyChanges();
}

If you do the above, then run the code it should display a BLUE screen.

Now, take a window and DRAG another window across the blue screen. (your app is still running in Visual Studio)

What I get is the window you are trying to drag caused the monogame to kind of minimize and then it will show up as a white screen and it looks to have crashed.

Minimal Example Repo

No response

Expected Behavior

It should work correctly based on the settings that were applied:

Borderless FullScreen - mouse can move to and from the game to another application without any issues - the game should continue to play as one would expect in a full-screen borderless game. I can drag a window ontop of the game and it works and continues to run with no issues. It should not matter the resolution. IF the resolution is an issue, it should gracefully minimize itself.

FullScreen - if the game is bound by the fullscreen mode and again for any set resoution, and the person ALT+TABS out, the game should gracefully minimize itself and then upon the player clicking the icon, it should restore the game to its previous resolution without issues.

Resulting Behavior

The game crashes - it is still running, but it no longer is drawing and I can't find a way to get it working.

Files

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant