dechamps/RudeWindowFixer

GeForce Experience sneaky full screen window permanently at top level makes monitor rude

hedelmasalaatti opened this issue · 11 comments

I have seemingly the same problem as you originally had, and disabling the Geforce overlay fixes it, but for some reason this doesn't.
According to WindowInvestigator there are 2 identical NVIDIA Share.exe windows with the only difference being the HWND, 0x00000000000102DA vs 0x00000000000102E0

HWND: 0x00000000000102DA
PID: 11216 TID: 11220 "C:\Program Files\NVIDIA Corporation\NVIDIA GeForce Experience\NVIDIA Share.exe"
Class name: "CEF-OSC-WIDGET"
Extended styles: 0x08080080
Styles: 0x94000000
Window rect: (0, 0, 1920, 1080)
Client rect: (0, 0, 1920, 1080)
Placement: showCmd 1 minPosition (-1, -1) maxPosition (-1, -1), normalPosition (0, 0, 1920, 1080)
Text: "NVIDIA GeForce Overlay"
Shell managed: FALSE
Shell frame: FALSE
Overpanning: FALSE
Band: 1
Has "NonRudeHWND" property: FALSE
Has "LivePreviewWindow" property: FALSE
Has "TreatAsDesktopFullscreen" property: FALSE
Is window: TRUE
DWM is cloaked: 0x00000000
Is iconic: FALSE
Is visible: TRUE

Interesting. Let's try digging into this some more.

First thing I would ask is the full output of WindowMonitor (not just one window), preferably while the issue is happening (i.e. the taskbar is not always-on-top). If you can't reproduce it at the same time you have the command line window opened, a trick is to delay WindowMonitor and then trigger the issue. For example the following Powershell command will run WindowMonitor after a delay of 5 seconds has elapsed, giving you time to reproduce the issue before WindowMonitor runs:

Start-Sleep -Seconds 5; .\WindowMonitor.exe > windows.txt

After the 5 seconds have elapsed you can stop WindowMonitor using CTRL+C. Then please attach the resulting output (windows.txt) to this ticket. (For privacy reasons you might want to double-check the window titles you're including in the file.)

Okay so that's definitely something I haven't seen before. The problem is that the NVIDIA GeForce Overlay DT window is set as always on top (WS_EX_TOPMOST). I suspect that will make the rude window manager think your monitor is rude, since it's a full screen window at the top level. Surprisingly it doesn't have WS_EX_NOACTIVATE, but it has WS_DISABLED, which is somewhat eyebrow-raising...

I've not seen that particular window before. In my investigation the only permanent GeForce Experience window is named NVIDIA GeForce Overlay (without the DT suffix), and that one doesn't have WS_EX_TOPMOST. As you mentioned, in your case you have that other window as well, and it's most likely causing your problem.

I note that you also have a minimized CS:GO window in there. Can you please describe exactly what you were doing so that I can try to reproduce? I assume you were playing CS:GO in windowed mode, and then minimized it, and that's what triggers the issue? Do you also notice the issue even when CS:GO is completely closed? Did you actually open the GeForce Experience overlay itself at any point? (What I suspect is happening is that GeForce Experience is behaving differently because you have a game opened.)

(I have a few ideas on how to solve the general problem of a transparent full screen window setting itself as always on top, but I need to be able to reproduce this first so that I can test potential fixes.)

The issue happens constantly. CS:GO probably doesn't have anything to do with it, i just happened to be playing it. The issue persists after restarts, only goes away once i disable the Geforce overlay and after enabling the overlay the issue starts again. I was playing CS:GO in fullscreen mode. I'll restart and run WindowMonitor after, maybe that'd give more clear results.

windows.txt
This was right after a restart, open apps were Firefox, Discord, Powershell and one Explorer window

Um, okay. That will make this more difficult for me to reproduce. I'll have to see if I can make that always-on-top GeForce overlay "DT" window come up on my system somehow.

By the way your latest log is truncated. In fact your previous log was truncated as well. Not sure why - maybe you need to give more time to WindowMonitor to output the list, or maybe there's some bug in WindowMonitor I missed. (I should really improve the user experience on that tool...) But anyway, the most important stuff is there.

Could you provide the following information:

  • Windows version (from winver.exe)
  • GeForce Experience version
  • NVidia driver version
  • Do you have a single monitor or a multi-monitor setup
  • Any other information that you think might be relevant

Even if I can't reproduce there are still a few things I can try to stop these sneaky full screen windows from interfering with the monitor rude state. I'll see if I can whip up a test build for you to try.

Windows Home 21H1 (19043.1526)
GeForce Experience 3.25.0.84
nVidia Game Ready driver 511.23
Single monitor
I gave WindowMonitor ~10 seconds before closing both times.

Okay I managed to reproduce :)

I can get that DT window to show up if the GeForce Experience overlay is currently displaying anything, e.g. a notification message on the top right corner, or the performance overlay. And indeed, while that DT window is present, the taskbar loses always on top.

I will take a closer look at what's going on and determine the best way to fix this problem.

Now that i think about it this started when i enabled the FPS counter for Minecraft(which is apparently the only game i play with no integrated FPS counter).
Sure enough, it works just fine after i disabled the counter.

Well this was a bit trickier than I expected. Turns out one of the assumptions I made about the Rude Window Manager was wrong. It was a learning opportunity I guess…

Anyway, I've improved RudeWindowFixer to take care of this second failure mode that you discovered. The improved RudeWindowFixer now actively looks for any transparent windows and forcefully removes them from the set of full screen windows that the Rude Window Manager will consider. This basically means the Rude Window Manager will not treat that GeForce Experience "DT" window as being full screen any more, and will therefore keep the taskbar on top. For details see the updated README.

Regarding your specific use case, this basically means you should be able to keep the GeForce Experience performance overlay open and the taskbar will still be on top - you don't have to choose anymore :)

I'll be testing this new version over the weekend to try to weed out any unforeseen side effects. If you want to participate, you can download the test build from the b7ed292 commit; let me know how it goes. Make sure to manually kill your currently running RudeWindowFixer.exe process first.

The fix for this is now live in RudeWindowFixer 0.2.