Game screen out of desktop screen after quiting FULLSCREEN mode

My case is I set our game’s config as fullscreen mode as default in “DefaultGameUserSettings.ini”

And there is a setting menu in our game. one of game setting option called Full Screen. there is a check box can be check to change Window Mode between “windowed mode” and “full screen mode”.

My problem is when I first time into the game.I am in full screen mode then I Uncheck the Full Screen check box to quit full screen mode to windowed mode. My Game screen will out of desktop’s screen as my picture.

at the end I can drag or close the window at all.because window’s close button have been out of the desktop screen

Hey ryuikuya-

I just want to clarify to make sure I’m understanding your question correctly. Your game starts out in full screen, but when you uncheck the box part of the game window is cut off from the screen, is that correct? What settings are changing and where when you check/uncheck the Full Screen box in game? Also, if you change the resolution after unchecking the box (exiting full screen) are you able to see the entire game window?

Cheers

Thank you for repeat me.I am sorry for my description.
.
1,Your game starts out in full screen, but when you uncheck the box part of the game window is cut off from the screen, is that correct?

Yes, the game window 's top part is cut off from the screen.

2,What settings are changing?

I set the full screen mode in “DefaultGameUserSetting.ini”

[/Script/StormUnited.ShooterGameUserSettings]
ResolutionSizeX=2560
ResolutionSizeY=1440
LastUserConfirmedResolutionSizeX=2560
LastUserConfirmedResolutionSizeY=1440
WindowPosX=-1
WindowPosY=-1
bUseDesktopResolutionForFullscreen=False
FullscreenMode=0
LastConfirmedFullscreenMode=0

and I set the changing in “DefaultGameUserSettings.ini”

[/Script/UnrealEd.LevelEditorPlaySettings]
StandaloneWindowWidth=2560
StandaloneWindowHeight=1440

3, where when you check/uncheck the Full Screen box in game?

I check/uncheck Full screen box like following code

  //Get the CurrentResolution 
    Scalability::FQualityLevels q = UserSettings->ScalabilityQuality;
    
    FIntPoint resolotionPoint = UserSettings->GetScreenResolution();
    
    FString CurrentResolution = FString::Printf(TEXT("%dx%d"), LocalPlayer->ViewportClient->Viewport->GetSizeXY().X, 
    LocalPlayer->ViewportClient->Viewport->GetSizeXY().Y);
    
    //Get changing FullscreenModel
    FString FullscreenModelStr;
    if (Fullscreen.Equals(TEXT("1")))
    {
    	FullscreenModelStr = TEXT("f");
    }
    else
    {
    	FullscreenModelStr = TEXT("w");
    }
    
    //Set full screen or out of fullscreen
    FString CM = TEXT("r.SetRes ") + CurrentResolution + FullscreenModelStr;
    Viewport->ConsoleCommand(CM);

4,if you change the resolution after unchecking the box (exiting full screen) are you able to see the entire game window?

I tried to change resolution 480x320 it still cut off from the screen.

Hey ryuikuya-

There are a couple other questions I have to help determine what exactly is happening. Do you get the same window behavior if you use the “fullscreen” console command rather than the checkbox in your settings menu? Also, where is the window located if you start the game in windowed mode rather than fullscreen?

1,Do you get the same window behavior if you use the “fullscreen” console command rather than the checkbox in your settings menu?

Yes if I Open the console command after press “~” then I execute full command directly. it is same result.

2,where is the window located if you start the game in windowed mode rather than full screen?

it is located in the centre . But one stuff I need to point out . I set the default resolution size is 2560 x 1440 because some one told me if you do not know the Max size of you screen u can just set this size then it will return you computer’s desktop screen size.

Hey ryuikuya-

I believe that is only the case while in fullscreen mode. Something you could try is, when leaving fullscreen also set the resolution to something below the monitor’s max resolution.

Cheers

I even tried to set the resolution like 480x320 the game screen still on the top left monitor’s screen and it still cut off from the screen. you can see my picture it is the most top of my monitor’s shootscreen

Does anybody can help me. I did not fix it

Hey ryuikuya-

I apologize for the delayed response. I have submitted a report of the game window being off screen to our internal tracking database (UE-8061) for further investigation by an engineer. For the time being I would try starting the game windowed and then entering fullscreen mode. This should allow the game window to resume its previous position when fullscreen is exited.

Cheers