-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] Regression in window sizing #7284
Comments
Would appreciate a fix before the NW1 removal (#7230). |
Will look into it soon. btw, I recently clarified the setting of inner/outer dimension if the window: 9ea8972#diff-e3e2a9bfd88566b05001b02a3f51d286 |
In your test case it's setting the outer dimension of the window, which is actually set correctly (see the attached screenshot). The window under windows has a thick invisible resize handle. For the sake of cross-platform consistent application behaviour I suggest setting the inner dimension of your application's window, which is the size of the DOM window area. See also the upstream code here for the thick resize handle: https://cs.chromium.org/chromium/src/chrome/browser/ui/views/frame/glass_browser_frame_view.cc?rcl=9db6c8c8e3374ea24d5705672a7a33d26cb6be37&l=358 |
closing for now as it's working as expected. |
How do we do that? I'm not aware of an API for that - the NW.js Window API appears to only specify one size, which according to your comment, is now the outer size. |
The inner dimension can be set via |
Using resizeTo() seems buggy - I filed #7303 for that. |
NWJS Version : 0.43.1
Operating System : Windows 10 64-bit
Expected behavior
Setting a window size in NW2 should set the same size as before
Actual behavior
Setting the same size produces a different window size in NW2 mode
How to reproduce
Minimal repro: nw2-window-size.zip
This just sets the window size to 500x500.
Using alt+printscreen and pasting in to image editor to get the overall window size:
By default (with NW2): window size is 486x493
With --disable-features=nw2: window size is 502x528
The text was updated successfully, but these errors were encountered: