[raiguard][2.0.32] Mouse pointer offset on fullscreen change

Speiger
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Jul 30, 2016 9:45 pm
Contact:

[raiguard][2.0.32] Mouse pointer offset on fullscreen change

Post by Speiger »

factorio_SJcPGoqYqJ.jpg
factorio_SJcPGoqYqJ.jpg (1017.84 KiB) Viewed 695 times
So i found this weird bug where factorios screen gets broken when you have most likely windows change the size of the screen temporarily.

For those who are wondering what the bug is. Look where my mouse is and what is selected. Its 100% misaligned.

So my setup:
I have 2 screens, 1x 1920x1080 (16:9), and 1x 1920x1200 (16:10)
On my 16:9 monitor i have a Fullscreen app running and on my 16:10 i have a Fullscreen windowed mode factorio instance open.

Sometimes this Fullscreen app switches around between Fullscreen and non Fullscreen and back.
For some reason that causes factorios screen to go to from 16:10 to 16:9 and then back to 16:10.
Not even sure if factorio picks that up but the screen is treated as 16:10 but the window is only 16:9..
Some real interesting desync happening here.
User avatar
atomizer
Fast Inserter
Fast Inserter
Posts: 134
Joined: Sat Sep 22, 2018 3:18 pm
Contact:

Re: [2.0.32] Factorio maximized screen issues.

Post by atomizer »

You should post a log.
When you say "Fullscreen windowed mode", what does that mean exactly? On the (confusingly cropped) screenshot I can see parts of desktop visible, which is the opposite of fullscreen.
Loewchen
Global Moderator
Global Moderator
Posts: 10125
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [2.0.32] Factorio maximized screen issues.

Post by Loewchen »

Yes post the log please.
Ref.: 118896
Speiger
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Jul 30, 2016 9:45 pm
Contact:

Re: [2.0.32] Factorio maximized screen issues.

Post by Speiger »

Not that it is going to help since the log is not containing "debug infos" this just a waste of time.

@atomizer:
The window is actually in "Maximized" Mode. You know when button next to the "Close window button" that you click to maximize to the screen?
In other words how did i achieve that image with tiny bit of the desktop showing when the window is still in "maximized" mode?

This is the bug i am posting :)

Here are 2 videos showing the issue...
Attachments
xr3F4UCzlT.mp4
This shows how only factorio is affected by it...
(5.19 MiB) Downloaded 30 times
RpcstCabNo.mp4
This is the video showing the bug in live action :)
(10.9 MiB) Downloaded 34 times
factorio-current.log
(13.89 KiB) Downloaded 28 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15644
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.32] Mouse pointer offset on fullscreen change

Post by Rseding91 »

I would attempt to look into this and try to get it fixed... except every single screen I own has the exact same resolution which means this never happens for me.
If you want to get ahold of me I'm almost always on Discord.
eugenekay
Filter Inserter
Filter Inserter
Posts: 501
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.32] Mouse pointer offset on fullscreen change

Post by eugenekay »

pic
What are the Windows' "Scale" setting for each Monitor? Are they exactly the same, or is one 150% while the other is 125% ? Which Monitor is the game "Starting" on / what is the default Display in Factorio settings? It might be a disagreement between the "Rendered" position and the "Physical" position of the cursor. Ensure both are set to the same Scale, restart the computer (not just a Logout/Login!), and try again.

According to your actually-possibly-helpful Logfile:
1.656 [1]: \\.\DISPLAY2 - NVIDIA GeForce RTX 4070 Ti {0x05, [0,0], 2560x1440, 32bit, 144Hz}
1.656 [0]: \\.\DISPLAY1 - NVIDIA GeForce RTX 4070 Ti {0x01, [-1920,0], 1920x1080, 32bit, 60Hz}

Display2 (2560x1440) is your "Center" monitor at 0,0; Display1 (1920x1080) is offset by -1920 Pixels. If you swap the Monitors "Virtual Position" such that Display1 is at +1920 does it still occur? (you don't need to move them on your desk, unless that breaks your mouse/brain too much....). A reboot should not be necessary for this Test.

It also looks like you are using GPU Outputs 0x01 and 0x05… presumably this corresponds to the HDMI and DisplayPort outputs. When the other Fullscreen app does a “screen flicker” is it actually switching between Screens (the display does not go black / switch Modes), or are both Screens flicking on/off (the Display Mode settings are changed) ? If the displays are having to re-negotiate the Resolution over DisplayPort/HDMI then things can get a little crazy in the Win32 API - you are lucky if all the monitors re-populate at the same Color/Refresh rate each time :-)

Windows’ 3D rendering is far more stable in “Windowed” mode, because no attempt is made to hand control of the Display Mode to Applications - they are forced into the Window they are given… hence the name of the OS.

Good Luck!
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 730
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][2.0.32] Mouse pointer offset on fullscreen change

Post by raiguard »

Thanks for the report. This is actually a bug in SDL. I have opened an upstream bug report.
Don't forget, you're here forever.
Post Reply

Return to “Assigned”