You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
When I start CrossCode (using the latest NW.js, not the bundled one) in fullscreen under Linux, it does not respect the "primary" screen. Instead, it starts on the top left screen, essentially at 0, 0. This happens under both Xfce/X11 and KDE/Wayland.
If I exit fullscreen, drag the window across to the correct screen, and make it fullscreen again, then it stays on the correct screen, but this does not persist to the next invocation.
Expected/Proposed Behavior
Both of these environments have the concept of a primary screen so it should respect this like other applications do. I have checked the Chromium source and found even that has the concept of a primary screen.
I don't think this is a bug with CrossCode itself, but I do not know of another NW.js example I could try for comparison. I'd be happy to do so if pointed at one though.
I wonder whether NW.js even needs to check for the primary screen. This code in nw_content.cc seems to anchor new windows at 0, 0 almost unconditionally. What if it simply didn't do that?
int x = 0, y = 0;
if (manifest->GetInteger(switches::kmX, &x))
ret.window_spec.bounds.set_x(x);
if (manifest->GetInteger(switches::kmY, &y))
ret.window_spec.bounds.set_y(y);
Additional Info
Operating System: Gentoo Linux
NW.js Version: 0.67.0
Repro Link: N/A
Code snippet: N/A
Crash report: N/A
The text was updated successfully, but these errors were encountered:
I don't think it's the same issue. I tried 0.60.0, but it didn't help. However, I did play around with CrossCode's package.json a bit more. Here's what it normally looks like.
If I remove width and height then it works. fullscreen makes no difference as the game starts fullscreen by default anyway. I guess it uses its own logic for that.
The problem is that removing width and height prevents the game's "double size" option from working properly. It doesn't double the size of the window so you only see the top-left quarter of the game. You can resize the window manually, but it doesn't remember that the next time.
In short, setting width and height should not break which screen the game starts on. This is probably an NW.js bug. I don't think it's the game's own fullscreen logic messing it up because the above workaround respects the primary screen, even when the game isn't fullscreen.
Issue Type
Bug Report
Feature Request
Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
When I start CrossCode (using the latest NW.js, not the bundled one) in fullscreen under Linux, it does not respect the "primary" screen. Instead, it starts on the top left screen, essentially at 0, 0. This happens under both Xfce/X11 and KDE/Wayland.
If I exit fullscreen, drag the window across to the correct screen, and make it fullscreen again, then it stays on the correct screen, but this does not persist to the next invocation.
Expected/Proposed Behavior
Both of these environments have the concept of a primary screen so it should respect this like other applications do. I have checked the Chromium source and found even that has the concept of a primary screen.
I don't think this is a bug with CrossCode itself, but I do not know of another NW.js example I could try for comparison. I'd be happy to do so if pointed at one though.
I wonder whether NW.js even needs to check for the primary screen. This code in nw_content.cc seems to anchor new windows at 0, 0 almost unconditionally. What if it simply didn't do that?
Additional Info
The text was updated successfully, but these errors were encountered: