nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Frameless windows have a lot of issues on Linux and Windows (With NW2 mode)

Open malisipi opened this issue 1 year ago • 18 comments

Issue Type

Before opening an issue, please search and see if it has already been raised.

  • [x] Bug Report

  • [ ] Feature Request

  • [x] Successfully reproduced against the latest version of NW.js?

Please use our mailing list or Gitter chatroom to ask questions. The issue tracker is only for bugs and feature requests, in English only. Please note that issues without a repro or code snippet are less likely to be resolved.

Current/Missing Behavior

  • The last update was broke (from 0.82.0 to 0.83.0) -webkit-app-region:drag CSS feature. (in Wayland, X11)
  • Also in X11, frameless examples is working with a titlebar. (Also related with https://github.com/nwjs/nw.js/issues/8137) Ekran Görüntüsü - 2023-12-27 22-04-00
  • Transparency also is not working correctly with latest version. (in Wayland, X11)

Expected/Proposed Behavior

  • All frameless examples works without titlebar
  • NW will respect -webkit-app-region property.
  • Also transparency is working correctly.

Additional Info

Those bugs is fixed when disabled NW2 mode. (--disable-features=nw2) #7230

  • Operating System: Ubuntu 23.10 x86_64
  • NW.js Version: 0.83.0 (SDK)
  • Repro Link: https://github.com/nwutils/frameless-example
  • Code snippet:
  • Crash report:

malisipi avatar Dec 27 '23 19:12 malisipi

Win10 the same issues.

ssnangua avatar Jan 01 '24 00:01 ssnangua

Same issue in windows 11.

UtterDonkey avatar Jan 13 '24 23:01 UtterDonkey

@rogerwang Could you take a look at this please?

UtterDonkey avatar Jan 13 '24 23:01 UtterDonkey

Might I suggest you rename this issue so that it's more obvious it's an issue with frameless windows themselves and not with the frameless examples?

UtterDonkey avatar Jan 20 '24 11:01 UtterDonkey

I'm not able to reproduce this problem in v0.82.0.

UtterDonkey avatar Jan 25 '24 19:01 UtterDonkey

I think this may have something to do with it: https://github.com/nwjs/nw.js/compare/nw82...nw83#diff-52fe046e03b7bd92f94816d435f9ed44082d363c02741801391d796e720d2765

https://chromium-review.googlesource.com/c/chromium/src/+/4915599

UtterDonkey avatar Jan 25 '24 19:01 UtterDonkey

The drag issue will be fixed and released in upcoming 0.85.0 with Chromium 122. Thanks.

rogerwang avatar Feb 13 '24 01:02 rogerwang

The drag issue will be fixed and released in upcoming 0.85.0 with Chromium 122. Thanks.

hi roger, is this fix app-region: drag ? https://discord.com/channels/806232493770276865/806232494445690892/1207021495860334662 thank for clarification.

jonlepage avatar Feb 13 '24 18:02 jonlepage

I was testing my local fix with OP's sample, which uses -webkit-app-region: drag.

rogerwang avatar Feb 13 '24 18:02 rogerwang

Have you managed to fix any other of the issues with frameless windows like transparency, rounded corners etc.?

UtterDonkey avatar Feb 13 '24 18:02 UtterDonkey

Please try this build: https://dl.nwjs.io/live-build/nw85/20240217-223403/1c035e527/v0.85.0/nwjs-sdk-v0.85.0-linux-x64.tar.gz https://dl.nwjs.io/live-build/nw85/20240217-163921/0782fe73e/v0.85.0/nwjs-sdk-v0.85.0-win-x64.zip

rogerwang avatar Feb 18 '24 00:02 rogerwang

Please try this build: https://dl.nwjs.io/live-build/nw85/20240217-223403/1c035e527/v0.85.0/nwjs-sdk-v0.85.0-linux-x64.tar.gz https://dl.nwjs.io/live-build/nw85/20240217-163921/0782fe73e/v0.85.0/nwjs-sdk-v0.85.0-win-x64.zip

work for me thank for your time

jonlepage avatar Feb 18 '24 02:02 jonlepage

I will test it for my issues on windows as soon as possible and get back to you.

UtterDonkey avatar Feb 18 '24 07:02 UtterDonkey

@rogerwang

I get this weird effect after moving a window with resizable: false and then if I make it frameless, it removes the rounded corners.

https://github.com/nwjs/nw.js/assets/68461677/270e7cb5-2f52-4eba-94e4-481fece9dadb

UtterDonkey avatar Feb 18 '24 13:02 UtterDonkey

Fixed the issue for me as well (windows)

Sheepux avatar Feb 25 '24 13:02 Sheepux

@rogerwang

I get this weird effect on the borders after moving a window with resizable: false and then if I make it frameless, it removes the rounded corners.

https://github.com/nwjs/nw.js/assets/68461677/270e7cb5-2f52-4eba-94e4-481fece9dadb

@Sheepux Are you able to reproduce any of these problems?

UtterDonkey avatar Feb 26 '24 07:02 UtterDonkey

Please try this build: https://dl.nwjs.io/live-build/nw85/20240217-223403/1c035e527/v0.85.0/nwjs-sdk-v0.85.0-linux-x64.tar.gz https://dl.nwjs.io/live-build/nw85/20240217-163921/0782fe73e/v0.85.0/nwjs-sdk-v0.85.0-win-x64.zip

-webkit-drag-region CSS property and titlebar issues is fixed on Ubuntu 23.10 x86_64.

However there're still some problems about transparency. It would be a sync issue about Gnome' window manager. (Also it can be reproducible in XWayland and Wayland).

Also still context menu of draggable area is still showing "(empty)" text instead of opening system menu (like Windows does).

Issue Expected Behaviour
Image1 Image2

malisipi avatar Feb 26 '24 20:02 malisipi

@rogerwang this one worked https://github.com/nwjs/nw.js/issues/8153#issuecomment-1950614414 but update to 0.88.0 will broke app-region again !

jonlepage avatar May 23 '24 04:05 jonlepage

Please try this build: https://dl.nwjs.io/live-build/nw90/20240719-033120/32b360f54/v0.90.0/

rogerwang avatar Jul 19 '24 17:07 rogerwang