【问题标题】:How to enable windows docking with frameless electron window如何启用与无框电子窗口的窗口对接
【发布时间】:2018-06-14 01:26:30
【问题描述】:

因此,electron 有一个功能,您可以通过将“frame”选项设置为 false 来制作 BrowserWindow 无框架。从版本 1.4.14 起,停靠(使用 windows 键 + 左/右)或拖动窗口(和最大化)不再起作用。

我在电子版本中找不到任何 API 更改或文档中有关此功能的任何具体内容。

我正在从 electron 1.4.4 升级到 1.7.10。

复制:https://github.com/PerfectionCSGO/electron-dwm-issue

# Clone this repository
git clone https://github.com/PerfectionCSGO/electron-dwm-issue
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Run the app
npm start
# Change the values around of setResizable and resizable to fiddle with the behavior.

【问题讨论】:

    标签: javascript electron dwm


    【解决方案1】:

    如果你最初设置 resizable 为 false,然后 setResize(true),确定你可以调整大小,那么 windows 中的停靠功能将被破坏。 我在这里提出了一个问题来跟踪问题:https://github.com/electron/electron/issues/11568

    我的解决方案是允许用户始终调整大小以支持破坏停靠功能。

    原始问题也已被编辑为具有可重现的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-27
      • 1970-01-01
      • 2015-06-28
      • 1970-01-01
      • 2020-06-15
      相关资源
      最近更新 更多