Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NW2] Steam Overlay is drawn over NWjs window title bar #7362

Open
TheRealDannyyy opened this issue Feb 7, 2020 · 16 comments
Open

[NW2] Steam Overlay is drawn over NWjs window title bar #7362

TheRealDannyyy opened this issue Feb 7, 2020 · 16 comments
Labels

Comments

@TheRealDannyyy
Copy link

TheRealDannyyy commented Feb 7, 2020

NWJS Version: v0.44.0
Operating System: Windows 10
Project Reproduction: Steam Overlay Test.zip

Expected behavior

The Steam Overlay should not be drawn over the title bar.

Default Window:
Window Default

Steam Overlay (NW2):
Window Overlay NW2

Steam Overlay (NW2, after being closed):
Window Overlay Closed

Actual behavior

The Steam Overlay is drawn over the window title bar and also overrides all of its functions. This issue can only be reproduced in Windows 10.

How to reproduce

  1. Download reproduction example
  2. Download and run Steam
  3. Add nw.exe as Non-Steam game (Games > Add Non-Steam Game To My Library > Browse...)
  4. Run it in the Steam Library
  5. Press SHIFT + TAB to open Steam Overlay
@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Feb 23, 2020

I've further investigated this issue and below are my findings. Turns out it was working in NW1 in the past, broke somewhere along the way and completely broke in NW2. (Tagging #7230.)

NWjs v0.36.4 [NW1]:
NWjs 0 36 4

NWjs 0.38.0+ [NW1] (couldn't test on v0.37.0 because --in-process-gpu was broken):
NWjs 0 38 0

NWjs v0.44.2 [NW2]:
NWjs 0 44 2

@TheRealDannyyy TheRealDannyyy changed the title Steam Overlay is drawn over NWjs window title bar [NW2] Steam Overlay is drawn over NWjs window title bar Feb 23, 2020
@rogerwang
Copy link
Member

Could you attach a picture of the NW2 window without the overlay?

And could you also test Chrome browser there? Thanks.

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Feb 27, 2020

"Default Window" is the NW2 window without overlay.

It was difficult to reproduce but it's the same behavior in Chrome. I'm 99% sure that a report to them would result in nothing (no one is using Chrome Browser to run their HTML5 Steam games, that's why NWjs exists). I'd really appreciate any help from your side if possible.

Here is the default window again:
Window Default

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Mar 21, 2020

Turns out if you run it in "Windows 7 Compatible Mode", it works as expected. Seems like Chromium has implemented some sort of exclusive Window Title Bar for Windows 10, which breaks the Steam Overlay.

Windows 10 (in Windows 7 compatible mode):
image

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Mar 31, 2020

@rogerwang I found a workaround to get the overlay working as intended using the "--disable-windows10-custom-titlebar" chromium arg. The window title buttons still don't work and the window can't be moved, when the Steam Overlay is enabled but at least it renders correctly.

Windows 10 (with "--disable-windows10-custom-titlebar"):
image

@skymen
Copy link

skymen commented Aug 4, 2020

From my testing, even with --disable-windows10-custom-titlebar, the overlay still appears above the title bar.
It does work perfectly in "Windows 7 Compatible Mode" on my end too!

image

@TheRealDannyyy
Copy link
Author

@skymen Are you sure that you disabled the custom title bar? It should look similar to the white one in the screenshot above. Try not disabling vsync, it could be in conflict with that.

@skymen
Copy link

skymen commented Aug 4, 2020

I tried removing the --disable-gpu-vsync but it still renders above the title bar.
It looks like that with overlay closed
image

Edit: I've tested on 0.46.0 with these args:
"--disable-plugins --disable-internal-flash --disable-popup-blocking --enable-gamepad --enable-html5-camera --allow-file-access-from-files --ignore-gpu-blacklist --limit-fps=60 --disable-devtools --in-process-gpu --disable-direct-composition --disable-windows10-custom-titlebar"

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Aug 4, 2020

The best way for me to investigate why it isn't working on your end, would be to upload the package.nw file here.
It's working fine for me, except the window buttons not working while the overlay is active but that's a known issue.

@skymen
Copy link

skymen commented Aug 4, 2020

package.zip
Here is the package.nw file

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Aug 4, 2020

The example project doesn't seem to have a constantly refreshing canvas. I'd regardless recommend to put the "--disable-windows10-custom-titlebar" at the beginning before all other args and test if that does anything. If that doesn't work, I'd suggest trying to reproduce this with the latest version of NWjs.

@skymen
Copy link

skymen commented Aug 5, 2020

Indeed, putting the flag at the start of the list, before everything else seems to have fixed it.

@TheRealDannyyy
Copy link
Author

Indeed, putting the flag at the start of the list, before everything else seems to have fixed it.

If you got time. Maybe you can shift it 1 place at a time to find out which other arg it's in conflict with.

This could be an NWjs issue that can fixed.

@skymen
Copy link

skymen commented Aug 5, 2020

I'll try that but with a binary search type algorithm, it'll be much faster to find out I think.

EDIT: It only bugs out when I put it last, after --disable-direct-composition

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Aug 5, 2020

I don't think anything can done about this. Chromium probably executes the args from left to right (first to last) and some features are bound to others. This is probably one of those cases.

(As a side note "--disable-direct-composition" should only be a last resort, if you experience major rendering issues.)

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants