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

Windows snap is lost with frameless transparent window and webkit-app-region drag #6219

Closed
Yonezpt opened this issue Oct 20, 2017 · 6 comments
Assignees

Comments

@Yonezpt
Copy link

Yonezpt commented Oct 20, 2017

NWJS Version : SDK 0.26.0
Operating System : Win7 x64

Expected behavior

Window snap should stay working as normal with frameless transparent window

Actual behavior

Window snap is completely lost

How to reproduce

Window snap behavior can be previewed here for better understanding: http://i1-news.softpedia-static.com/images/news2/snap-in-windows-10-overview-and-enhancements-489110-4.gif

Using a basic app, move the window against top or side edges of the screen, it should display the snap preview and letting it go will cause it to resize the app on its own to the preview size.

aero

Instead there is no recognition of window snap and the described behavior is absent, the window never resizes

noaero

App sample using package.nw folder:

<!DOCTYPE html>
<html style="background:white;height:100%;-webkit-app-region:drag">
    <head>
    </head>
    <body></body>
</html>
{
    "author": "test",
    "description": "test",
    "main": "index.html",
    "name": "test",
    "version": "1.0.0",
    "window": {
        "frame": false,
        "transparent": true
    }
}

I don't know if this is expected behavior, meaning that this is meant to be like this when using a transparent frameless window, but thought it should be reported in case it is a bug.

@Christywl
Copy link
Contributor

I can reproduce this issue on Windows with nwjs-sdk-0.26.0.

@rogerwang
Copy link
Member

CC @jtg-gg , please take a look. Thanks in advance.

@kapilmoondra
Copy link

Looks like this is an issue with smaller window size. We are developing a snapping application and facing same issue on windows platform. Window size is pretty much same as shown in problem here. Even elctron is facing similar issue and they have left it to Chromium and closed this issue as won't fix (electron/electron#2170)

@Yonezpt
Copy link
Author

Yonezpt commented Oct 23, 2017

@kapilmoondra Sounds like a very different problem. This one appears to be just a botched window size calculation, leaving the width equal to the screen minus the resize border. If the mouse cursor didn't change then I would consider these being related, but they are not.

Nevermind the above, I thought this was #6221

@jtg-gg
Copy link
Member

jtg-gg commented Oct 25, 2017

@rogerwang I've made a pull request nwjs/chromium.src#98
please also patch nw27

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

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

No branches or pull requests

5 participants