Skip to content

Commit 8c9af4a

Browse files
Fix drag issue (#125)
* Use electron-drag-click * Use quine fork of electron-drag-click for version compat * Update nvmrc
1 parent 1191126 commit 8c9af4a

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.18
1+
20.11.0

app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"color": "4.2.3",
2222
"default-shell": "1.0.1",
2323
"electron-devtools-installer": "3.2.0",
24+
"quine-electron-drag-click": "1.0.6b",
2425
"electron-fetch": "1.9.1",
2526
"electron-is-dev": "2.0.0",
2627
"electron-store": "8.2.0",

app/ui/window.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type {BrowserWindowConstructorOptions} from 'electron';
88
import {enable as remoteEnable} from '@electron/remote/main';
99
import isDev from 'electron-is-dev';
1010
import {getWorkingDirectoryFromPID} from 'native-process-working-directory';
11+
import electronDragClick from 'quine-electron-drag-click';
1112
import {v4 as uuidv4} from 'uuid';
1213

1314
import type {sessionExtraOptions} from '../../typings/common';
@@ -26,6 +27,8 @@ import toElectronBackgroundColor from '../utils/to-electron-background-color';
2627

2728
import contextMenuTemplate from './contextmenu';
2829

30+
electronDragClick();
31+
2932
export function newWindow(
3033
options_: BrowserWindowConstructorOptions,
3134
cfg: configOptions,

app/yarn.lock

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ binary-extensions@^2.0.0:
176176
resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522"
177177
integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==
178178

179+
bindings@^1.5.0:
180+
version "1.5.0"
181+
resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
182+
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
183+
dependencies:
184+
file-uri-to-path "1.0.0"
185+
179186
brace-expansion@^1.1.7:
180187
version "1.1.11"
181188
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -458,6 +465,11 @@ fast-uri@^3.0.1:
458465
resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz#88f130b77cfaea2378d56bf970dea21257a68748"
459466
integrity sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==
460467

468+
469+
version "1.0.0"
470+
resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
471+
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==
472+
461473
fill-range@^7.1.1:
462474
version "7.1.1"
463475
resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
@@ -976,7 +988,7 @@ nice-try@^1.0.4:
976988
resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
977989
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
978990

979-
node-addon-api@^3.1.0:
991+
node-addon-api@^3.0.2, node-addon-api@^3.1.0:
980992
version "3.2.1"
981993
resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
982994
integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==
@@ -1207,6 +1219,14 @@ [email protected]:
12071219
dependencies:
12081220
inherits "~2.0.3"
12091221

1222+
1223+
version "1.0.6-b"
1224+
resolved "https://registry.npmjs.org/quine-electron-drag-click/-/quine-electron-drag-click-1.0.6-b.tgz#778d064db08d82241ae79357ffe982db444c47b2"
1225+
integrity sha512-m9uTUhHJf2q3878J8F1UHKRvgVxusodpqn924HePZ42YlfCQa3c85YDa2Ys8BbazmV8GC9f8uEUoKVJBXwOFTw==
1226+
dependencies:
1227+
bindings "^1.5.0"
1228+
node-addon-api "^3.0.2"
1229+
12101230
12111231
version "18.3.1"
12121232
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,9 @@
535535
optionalDependencies:
536536
global-agent "^3.0.0"
537537

538-
"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2":
538+
"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2":
539539
version "10.2.0-electron.1"
540-
resolved "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2"
540+
resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2"
541541
dependencies:
542542
env-paths "^2.2.0"
543543
exponential-backoff "^3.1.1"

0 commit comments

Comments
 (0)