File tree Expand file tree Collapse file tree 4 files changed +1725
-1714
lines changed
Expand file tree Collapse file tree 4 files changed +1725
-1714
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class WebuiBridge {
2929 #winY: number ;
3030 #winW: number ;
3131 #winH: number ;
32+ #customWindowDrag: boolean ;
3233 // Frameless Dragging
3334 #enableCustomDragging: boolean = false ;
3435 #isDragging: boolean = false ;
@@ -94,6 +95,7 @@ class WebuiBridge {
9495 winY = 0 ,
9596 winW = 0 ,
9697 winH = 0 ,
98+ customWindowDrag = false
9799 } : {
98100 secure : boolean ;
99101 token : number ;
@@ -103,6 +105,7 @@ class WebuiBridge {
103105 winY : number ;
104106 winW : number ;
105107 winH : number ;
108+ customWindowDrag : boolean ;
106109 } ) {
107110 // Constructor arguments are injected by webui.c
108111 this . #secure = secure ;
@@ -113,6 +116,7 @@ class WebuiBridge {
113116 this . #winY = winY ;
114117 this . #winW = winW ;
115118 this . #winH = winH ;
119+ this . #enableCustomDragging = customWindowDrag ;
116120 // Token
117121 this . #Token[ 0 ] = this . #token;
118122 // Instance
@@ -176,9 +180,8 @@ class WebuiBridge {
176180 let target = e . target ;
177181 while ( target ) {
178182 let computedStyle = window . getComputedStyle ( target ) ;
179- let webkitComputed = computedStyle . getPropertyValue ( "-webkit-app-region" ) . trim ( ) ;
180183 let webuiComputed = computedStyle . getPropertyValue ( "--webui-app-region" ) . trim ( ) ;
181- if ( webkitComputed === "drag" || webuiComputed === "drag" ) {
184+ if ( webuiComputed === "drag" ) {
182185 this . #initialMouseX = e . screenX ;
183186 this . #initialMouseY = e . screenY ;
184187 this . #initialWindowX = this . #currentWindowX;
You can’t perform that action at this time.
0 commit comments