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 issue] : Resizing two binded windows doesn't work anymore #7369

Closed
DimPaDev opened this issue Feb 10, 2020 · 3 comments
Closed

[NW2 issue] : Resizing two binded windows doesn't work anymore #7369

DimPaDev opened this issue Feb 10, 2020 · 3 comments

Comments

@DimPaDev
Copy link

DimPaDev commented Feb 10, 2020

NWJS Version : 0.44.0
Operating System : Linux (Fedora 31, both kde and gnome), Windows 10

Expected behavior

When you bind two windows both in size and position you should be able also to resize one window and the other should correctly react to the changes defined in the 'resize' event just like in nw1 mode (--disable-features=nw2).

nw1resize

Actual behavior

In Nw2 mode if you bind two windows in size using the 'resize' event and its callback parameters results in a weird flickering issue which prevents the application to work normally.

nw2resize

I also found that this code will work even in nw2 mode :

             secondWin.on('resize', (w, h) => {
              console.log('ok main win resized');
              mainWin.resizeTo(w, h);
            });

However, if you try to add something to the resizeTo call the bug will appear:

            secondWin.on('resize', (w, h) => {
              console.log('ok main win resized');
              // with this line the bug appears in nw2 mode
              mainWin.resizeTo(w + 50, h + 50);
            });

How to reproduce

DEMO: nw2-resize-two-windows-bug.zip

@DimPaDev
Copy link
Author

As it is a blocking issue I will reference this to : #7230

@rogerwang
Copy link
Member

This was also fixed with #7368

@DimPaDev
Copy link
Author

I can confirm this is fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants