[GH-ISSUE #246] Window resizing on macOS makes windows to jump over. #167

Closed
opened 2026-05-05 11:51:55 -06:00 by gitea-mirror · 14 comments
Owner

Originally created by @goranmoomin on GitHub (Jan 20, 2020).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/246

Before the bug report, I would first like to really thank you for the huge work of Proton Native v2!
It's a huge step forwards to removing electron from our app ecosystem :-)

Describe the bug
On macOS, resizing windows are glitchy and they always jump to the corner of the screen when the user tries to resize it. The following GIF (which is big, sorry :-( - about 50 megs) shows it from the Notepad example, but I also have checked the Calculator example & CatApi example and it had similar behavior.

Edit: looks like GitHub doesn't like Gifs that are too big - the raw link is https://i.imgur.com/Y2n3m1D.gifv

To Reproduce
I'm running macOS 10.15.2 (19C57) with node v10.18.1.
I think I just used the standard commands to run the application... but for completeness I used the following commands:

$ git clone https://github.com/kusti8/proton-native.git
$ cd proton-native
$ npm i
$ npm link
$ cd examples/Notepad
$ npm link proton-native
$ npm i
$ npm run start

As said, pretty standard :-)

Expected behavior
I didn't expect to the title bar disappear when resizing, or jump to the corner. Pretty self-explanatory.

Screenshots
Edit: looks like GitHub doesn't like Gifs that are too big - the raw link is https://i.imgur.com/Y2n3m1D.gifv

Versions:

  • OS: macOS Catalina 10.15.2 (19C57)
  • Version: 2.0.0
  • Node version: v10.18.1

Additional context

Originally created by @goranmoomin on GitHub (Jan 20, 2020). Original GitHub issue: https://github.com/kusti8/proton-native/issues/246 Before the bug report, I would first like to really thank you for the huge work of Proton Native v2! It's a huge step forwards to removing electron from our app ecosystem :-) **Describe the bug** On macOS, resizing windows are glitchy and they always jump to the corner of the screen when the user tries to resize it. The following GIF (which is big, sorry :-( - about 50 megs) shows it from the Notepad example, but I also have checked the Calculator example & CatApi example and it had similar behavior. Edit: looks like GitHub doesn't like Gifs that are too big - the raw link is https://i.imgur.com/Y2n3m1D.gifv **To Reproduce** I'm running macOS 10.15.2 (19C57) with node v10.18.1. I think I just used the standard commands to run the application... but for completeness I used the following commands: ```shellsession $ git clone https://github.com/kusti8/proton-native.git $ cd proton-native $ npm i $ npm link $ cd examples/Notepad $ npm link proton-native $ npm i $ npm run start ``` As said, pretty standard :-) **Expected behavior** I didn't expect to the title bar disappear when resizing, or jump to the corner. Pretty self-explanatory. **Screenshots** Edit: looks like GitHub doesn't like Gifs that are too big - the raw link is https://i.imgur.com/Y2n3m1D.gifv **Versions:** - OS: macOS Catalina 10.15.2 (19C57) - Version: 2.0.0 - Node version: v10.18.1 **Additional context**
gitea-mirror 2026-05-05 11:51:55 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@roman01la commented on GitHub (Jan 20, 2020):

Can confirm this issue is reproducible. It seems like Window component resets its properties when updated.

<!-- gh-comment-id:576288004 --> @roman01la commented on GitHub (Jan 20, 2020): Can confirm this issue is reproducible. It seems like `Window` component resets its properties when updated.
Author
Owner

@kusti8 commented on GitHub (Jan 20, 2020):

Yeah I suspect that when a user is resizing, this triggers the resize callback that ends up re rendering and resetting the size, which would reset the position. I'll look into it more.

<!-- gh-comment-id:576289769 --> @kusti8 commented on GitHub (Jan 20, 2020): Yeah I suspect that when a user is resizing, this triggers the resize callback that ends up re rendering and resetting the size, which would reset the position. I'll look into it more.
Author
Owner

@devhammed commented on GitHub (Jan 21, 2020):

I am about to open exactly this issue...the window is jumping and glitching on Ubuntu 19.10 too, this is a global issue.

<!-- gh-comment-id:576560573 --> @devhammed commented on GitHub (Jan 21, 2020): I am about to open exactly this issue...the window is jumping and glitching on Ubuntu 19.10 too, this is a global issue.
Author
Owner

@manashathparia commented on GitHub (Jan 21, 2020):

Same issue with windows 10 too! Although it doesn't jump to the corner while resizing but it does after clicking anywhere on the app after resized

<!-- gh-comment-id:576714019 --> @manashathparia commented on GitHub (Jan 21, 2020): Same issue with windows 10 too! Although it doesn't jump to the corner while resizing but it does after clicking anywhere on the app after resized
Author
Owner

@apollolux commented on GitHub (Jan 22, 2020):

Haven't checked yet if resizing resets the position, but for me even just the newly created project from proton-native init myapp starts at the top left corner of the screen.

<!-- gh-comment-id:576969548 --> @apollolux commented on GitHub (Jan 22, 2020): Haven't checked yet if resizing resets the position, but for me even just the newly created project from `proton-native init myapp` starts at the top left corner of the screen.
Author
Owner

@roman01la commented on GitHub (Jan 22, 2020):

After looking more into this it seems like QMainWindow component has to track its position in moveEvent, expose those values to JS and set them onto Yoga layout of the component instance when recalculating the layout. Otherwise both top and left will be always set to initial values, which are 0. Maybe instead we could ignore layout values for top and left for Window component.

<!-- gh-comment-id:577350133 --> @roman01la commented on GitHub (Jan 22, 2020): After looking more into this it seems like `QMainWindow` component has to track its position in `moveEvent`, expose those values to JS and set them onto Yoga layout of the component instance when recalculating the layout. Otherwise both `top` and `left` will be always set to initial values, which are `0`. Maybe instead we could ignore layout values for `top` and `left` for Window component.
Author
Owner

@apollolux commented on GitHub (Jan 23, 2020):

Update: resizing for me not only tries to reset the position, it's also flickering while it does it as if the desire to move is fighting with the existing position. Win10, proton-native 2.0.4

<!-- gh-comment-id:577470460 --> @apollolux commented on GitHub (Jan 23, 2020): Update: resizing for me not only tries to reset the position, it's also flickering while it does it as if the desire to move is fighting with the existing position. Win10, proton-native 2.0.4
Author
Owner

@digimbyte commented on GitHub (Jan 31, 2020):

Update: resizing for me not only tries to reset the position, it's also flickering while it does it as if the desire to move is fighting with the existing position. Win10, proton-native 2.0.4

Confirmed here too. windows 10 v1906 - window flickers to top corner and original position every frame.

<!-- gh-comment-id:580619333 --> @digimbyte commented on GitHub (Jan 31, 2020): > Update: resizing for me not only tries to reset the position, it's also flickering while it does it as if the desire to move is fighting with the existing position. Win10, proton-native 2.0.4 Confirmed here too. windows 10 v1906 - window flickers to top corner and original position every frame.
Author
Owner

@kusti8 commented on GitHub (Mar 16, 2020):

For now, I've just excluded Window from changes in position and size due to yoga. I'll figure out a better solution later.

<!-- gh-comment-id:599770487 --> @kusti8 commented on GitHub (Mar 16, 2020): For now, I've just excluded Window from changes in position and size due to yoga. I'll figure out a better solution later.
Author
Owner

@christopherfowers commented on GitHub (May 30, 2020):

Not sure I followed. Is there a workaround for this issue for the short term?

<!-- gh-comment-id:636393125 --> @christopherfowers commented on GitHub (May 30, 2020): Not sure I followed. Is there a workaround for this issue for the short term?
Author
Owner

@watery commented on GitHub (Sep 5, 2020):

@kusti8 Just installed Proton Native and noticed this bug. Can we do anything before a new release is made?

<!-- gh-comment-id:687657201 --> @watery commented on GitHub (Sep 5, 2020): @kusti8 Just installed Proton Native and noticed this bug. Can we do anything before a new release is made?
Author
Owner

@vs-123 commented on GitHub (Oct 14, 2020):

Is there any fix yet?

<!-- gh-comment-id:708314766 --> @vs-123 commented on GitHub (Oct 14, 2020): Is there any fix yet?
Author
Owner

@ghost commented on GitHub (Oct 17, 2020):

Version: 2.0.4

File: proton-native/bin/components/Window.js
Line: 44
render_1.ROOT_NODE.afterCommit(render_1.ROOT_NODE);
Commenting this line out seemed to stop the snapping to the corner when resizing. Hope it works for you!

<!-- gh-comment-id:710726073 --> @ghost commented on GitHub (Oct 17, 2020): ### Version: 2.0.4 **File:** proton-native/bin/components/Window.js **Line:** 44 `render_1.ROOT_NODE.afterCommit(render_1.ROOT_NODE);` Commenting this line out seemed to stop the snapping to the corner when resizing. Hope it works for you!
Author
Owner

@vs-123 commented on GitHub (Oct 19, 2020):

@moranot
It worked, thanks.

<!-- gh-comment-id:712267619 --> @vs-123 commented on GitHub (Oct 19, 2020): @moranot It worked, thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#167
No description provided.