Page 1 of 1

[0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Tue Nov 06, 2018 11:57 am
by mexmer
while there is workaround for this, it's still in category of mild annoyances.

let's say i have notebook with HD screen, and connected UHD monitor. i run factorio in fullscreen mode, and it starts on primary display (which is notebook screen), then i use keyboard shortcut to move window to other display (window + shirt + left/right). factorio stays in it's bordereless window mode (because that's what fullscreen on factorio does), but since it's in this mode, i cannot move it. it's alligned to topleft corner of UHD display.

funny thing is, that when you move factorio from UHD to HD with keyboard shortcut, it does downsize window, it just doesn't upsize when moving to higher resolution display.

workaround is to use ALT+ENTER to enter windowed mode, then either resize or move, or just use alt+enter again to enter "fullscreen" with new resolution.

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Wed Nov 07, 2018 10:31 am
by Klonan
I thought it might be fixed with 0.17 changes, but I can reproduce the issue exactly as you describe

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Wed Nov 07, 2018 11:44 am
by mexmer
this reminds me of one issue from past

viewtopic.php?f=48&t=49567

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Sun Nov 18, 2018 4:13 am
by TruePikachu
I'd think the issue is possibly with Windows. If you maximize the window for some other program, and use the same keyboard command to move it to a larger display, does it also resize?

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Sun Nov 18, 2018 9:07 am
by mexmer
TruePikachu wrote:
Sun Nov 18, 2018 4:13 am
I'd think the issue is possibly with Windows. If you maximize the window for some other program, and use the same keyboard command to move it to a larger display, does it also resize?
some programs do, some don't (for example chrome, firefox, or all microsoft office products resize properly)
and no. it's not issue with windows. many programs use own handling for size change, especially those running in borderless mode (eg. fake fullscreen).

if you overriding onsize change behavior, you need to handle everything.

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Mon Nov 19, 2018 10:15 am
by Rseding91
mexmer wrote:
Sun Nov 18, 2018 9:07 am
TruePikachu wrote:
Sun Nov 18, 2018 4:13 am
I'd think the issue is possibly with Windows. If you maximize the window for some other program, and use the same keyboard command to move it to a larger display, does it also resize?
some programs do, some don't (for example chrome, firefox, or all microsoft office products resize properly)
and no. it's not issue with windows. many programs use own handling for size change, especially those running in borderless mode (eg. fake fullscreen).

if you overriding onsize change behavior, you need to handle everything.
As far as I've seen with the old vs new logic: it's just "you need to handle everything". You don't get *any* logic built in when you make a window except "it has the exit button/minimize, maximize" when not borderless.

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Mon Nov 19, 2018 10:35 am
by mexmer
Rseding91 wrote:
Mon Nov 19, 2018 10:15 am
mexmer wrote:
Sun Nov 18, 2018 9:07 am
TruePikachu wrote:
Sun Nov 18, 2018 4:13 am
I'd think the issue is possibly with Windows. If you maximize the window for some other program, and use the same keyboard command to move it to a larger display, does it also resize?
some programs do, some don't (for example chrome, firefox, or all microsoft office products resize properly)
and no. it's not issue with windows. many programs use own handling for size change, especially those running in borderless mode (eg. fake fullscreen).

if you overriding onsize change behavior, you need to handle everything.
As far as I've seen with the old vs new logic: it's just "you need to handle everything". You don't get *any* logic built in when you make a window except "it has the exit button/minimize, maximize" when not borderless.
it's quite possible, since i lately work with old MFC UI, where everything needs to be handled, if you use own graphic draw ... but if you don't, you can leave it to windows default behavior ... i might have expected too much :D

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Wed Nov 21, 2018 8:43 am
by posila
Alt + Enter, move window, Alt + Enter is intended way to do it.

I tried 3 Microsoft applications - Edge, Windows Media Player and Age of Empires Definitive Edition. None of them allowed to move the window using Win + Shift + Arrow shortcut when in fullscreen, but none of them seem to actually use borderless fullscreen. Even Edge minimizes itself when other application on the same monitor gains focus.

I tried also Starcraft 2 and it behaves same way Factorio does.

Interestingly Win + Arrow are blocked when in borderless fullscreen - both in Allegro and SDL, but I haven't found code blocking it, so it might be because style of the window is WM_POPUP when borderless fullscreen - I suppose so the window can cover task bar.
The main problem comes from libraries assuming the window can't be moved when in bordeless fullscreen, and Windows not having concept of "borderless fullscreen" for non-UWP applications (don't know how UWP handles it) - it just sees a window of some fixed size (it can't be even in maximized, because it wouldn't cover task bar) so it moves it to different monitor retaining that size.

We'll have to bite a bullet here and handle it ourselves, but I don't like it. I already forgot Win + Shift + Arrow is a thing twice.

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Wed Nov 21, 2018 12:11 pm
by mexmer
hmm, i will send ticket to blizzard, have not played SC2 for a while.
i know, they fixed it for diablo, like year ago or so (before necro came out).

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Wed Nov 21, 2018 1:08 pm
by posila
I tried it in Diablo 3 too (before trying it in Starcraft) and it worked there the same way as in Factorio and Starcraft ... But Diablo leaves bad taste in people's mouth lately, so I didn't mention it.

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Wed Nov 21, 2018 1:14 pm
by mexmer
this is weird, diablo 3 resize works for me both ways (UHD connected to 1050Ti, FHD - actually 1920x1200 - connected to onboard gpu).

i reported when there was that issue with having "empty" space from windows toolbar, after move ...

anyways, blizzard games support doesn't bellong here :mrgreen: although they might hire you. ;)

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Sun Jan 06, 2019 1:50 am
by Rseding91
I'm going to move this to minor issues.

Re: [0.16.51] Factorio fulscreen windows doesn't upsize when moving between displays with different resolution

Posted: Tue May 21, 2019 10:35 am
by posila
Maybe fixed for 0.17.42

If there was an easy, obvious way to block the shortcut I would do that, but I don't want to create low level keyboard hook just to block system shortcuts, so it was easier to just attempt to handle moving of fullscreen window.