Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 7 posts ]
Author Message
 Post subject: Winstep steals focus from full screen apps
PostPosted: Sun Aug 28, 2022 1:58 pm 
Offline

Joined: Sun Aug 28, 2022 12:51 am
Posts: 4
Hi guys,

I am facing an issue with several different games when running Winstep Extreme.
Depending on the resolution setting of the app/game, the game starts and is immediately minimized because Winstep steals the focus from the App - possibly due to the resolution change.
When clicking the game in the taskbar, the game pops up and Winstep then steals the focus again. The game is then no more visible / minimized in the taskbar again.
When I shut down Winstep, I can switch back to the still running game.
After ending the game, I restart Winstep - not my preferred solution :-)

Is there a setting or configuration option for these full screeen apps?

Thanks!


Back to top
 Profile  
 
 Post subject: Re: Winstep steals focus from full screen apps
PostPosted: Sun Aug 28, 2022 5:50 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11933
What version of Winstep Xtreme are you running?

Does this happen with all games that change the desktop screen resolution or only some?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Winstep steals focus from full screen apps
PostPosted: Sun Aug 28, 2022 10:30 pm 
Offline

Joined: Sun Aug 28, 2022 12:51 am
Posts: 4
Hi Jorge,

Thanks for your quick reply.
I attached a screenshot with the version information.

It happens with nearly all apps that change the resolution. The amazing fact is that it happens only when switching to specific resolutions - not to all...
And to make it more irritating is the behaviour different if I use the internal or external monitor (internal native resolution on my MSI 2560x1600, external 4K). But for some games I would prefer a lower resolution - or the highest resolution is not supported - by older games for example.

I´m running windows 10 Pro and the graphics card is an NVIDIA RTX 3050.

Could I configure a delay or a block for specific apps?

KR


Attachments:
File comment: Winstep Version Screenshot
Winstep Version.png
Winstep Version.png [ 27.02 KiB | Viewed 5019 times ]
Back to top
 Profile  
 
 Post subject: Re: Winstep steals focus from full screen apps
PostPosted: Sun Aug 28, 2022 10:36 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11933
So, if I understood correctly, your system is basically a multi-monitor system?

Do they both have the same screen DPI (i.e. text scaling) ? If not, do you still get this issue if you set BOTH monitors to have the same text scaling/DPI value?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Winstep steals focus from full screen apps
PostPosted: Mon Aug 29, 2022 1:55 am 
Offline

Joined: Sun Aug 28, 2022 12:51 am
Posts: 4
Indeed it depends on the scaling / DPI setting.

I tested several scenarios. It does not depend on an equal or different scaling. The behaviour is always the same.
I also tested only the internal display active and only the external display active.

When setting the scaling to 100% - everything works fine on both monitors and with all apps.
When setting the scaling to 150% (my default), on both monitors weird things happen- either the app minimizes as described or in the worst case , the display turns black and I would have to navigate blind. Switching the monitors or going to sleep and reactivate the system turns the display on again.

With all other scalings, above or below 150%, in most cases the apps are working as expected.

Besides
- on both monitors the scaling was set to 150% when I was facing the issues and adding my post here - bad luck :-(
- the system has been setup from scratch and all software and drivers were updated
- I run native installed games as well as games from Epic, Steam, Legacy, battle.net, ...makes no difference

So I guess I found several workarounds now. Let me know if you want further details.

P.S.: Thanks for your continous support! ...and..great software!


Back to top
 Profile  
 
 Post subject: Re: Winstep steals focus from full screen apps
PostPosted: Mon Aug 29, 2022 5:57 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11933
Well, that actually took quite a different turn from what I was expecting when I asked that DPI question. Sit tight for the following explanation:

See, Winstep applications are *system-wide* high DPI compatible (in that they will work fine with different screen DPIs provided ALL monitors use the *same* DPI scaling) but it is not *per-monitor* high DPI compatible (something that was introduced in Windows 10).

Most applications were barely beginning to support high DPI settings when Windows 10 upped the game by introducing *per-monitor* high DPI settings.

Not that this wasn't badly needed, but it not only adds an extreme level of complexity (for instance, what do you do when a window is half displayed on a monitor set to 100 DPI but the other half is on a monitor set to 150 DPI?) for applications that were barely just beginning to add support for system-wide high DPI settings, as Microsoft's solution was to literally **lie** about screen resolutions etc to applications that do not explicitly declare themselves as per-monitor high DPI compatible.

While "lying" usually works well for "vanilla" applications, the fact that there is no implemented mechanism to bypass this "lie" for power applications like Winstep Xtreme can potentially create a TON of issues.

This is because some API calls will return 'virtual' coordinates (with no mechanism implemented to get the real coordinates), while others only work with real screen coordinates. Microsoft kind of did a half assed job on this.

Also, what happens when you switch to a full screen game or application is actually a lot more complex than most people think: there is no API call to tell an application 'hey, I am running a full screen game or application now' so the Winstep application must determine this on its own, and it's not always straightforward.

It is important to know when a full screen application is running so, for instance, screen edge dock activations don't accidentally kick in while you are playing a game, returning you to the Windows desktop in the middle of an important battle (also, any animations behind a full screen game/application are automatically de-activated to preserve resources for the game, although this isn't as important in this age of multi-core CPUs as it once was). Likewise the Winstep application must know when you are no longer running a full screen application so it can resume accepting screen edge bump activations, etc...

Things get even more complicated when a game switches screen resolution (thankfully a lot more rare these days):

When you deliberately change screen resolutions, the Winstep application must automatically move and resize objects around so nothing is suddenly off screen, plus update reserved screen areas etc (it also has a monitor profile mechanism that allows you to place objects at different places - and enable/disable certain objects - according to screen resolution/number of monitors).

However, when you launch a full screen game that changes screen resolution, this change is only temporary. The Winstep application MUST determine this (again, remember there is no API that lets the application know that you are now running a full screen game) so it does not switch stuff around or update reserved screen areas (this would bring the focus back to the Winstep application, and thus throw you out of the game).

As I think you can imagine by now, all this is extremely complex stuff, much more than it might look at first sight. And if the Winstep application gets it wrong... you get dumped back into the Windows desktop.

Now imagine all this complexity together with Windows lying to the Winstep application if you are using more than one monitor and those monitors have different screen DPIs. This is what I suspected might be happening there.

Your reply that this only happens when the screen DPI is set to 150% on BOTH monitors threw me off, though. What you describe (plus the fact that you sometimes get a black screen) sounds more like a bug in Windows than anything else, sincerely.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Winstep steals focus from full screen apps
PostPosted: Mon Aug 29, 2022 1:33 pm 
Offline

Joined: Sun Aug 28, 2022 12:51 am
Posts: 4
Thanks for sharing the insights. Well things have changed since Microsoft just offered an INT 21 ;-)
I admire the effort you put into this challenge.
I'll keep you posted on more discoveries.
I'm looking forward to the upcoming features :-)
Keep it up, stay healthy and all the best!


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 7 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: Majestic-12 [Bot] and 86 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: