@@ -207,22 +207,12 @@ define(function (require, exports, module) {
207207 } ) ;
208208 }
209209
210- async function _computeNewPositionAndSizeWebkit ( $activeElement ) {
211- // Get the current window
210+ async function _computeNewPositionAndSizeWebkit ( ) {
212211 const currentWindow = window . __TAURI__ . window . getCurrent ( ) ;
213-
214- // Get the bounds of the current window
215- const size = await currentWindow . innerSize ( ) ;
216- // in mac, the innerSize api in tauri gets the full size including titlebar. Since our sidebar is full size
217- const titlebarHeightIfAny = size . height - window . innerHeight ;
218- const currentWindowPos = await currentWindow . innerPosition ( ) ;
219- const offset = $activeElement . offset ( ) ;
220- const width = $activeElement . outerWidth ( ) ;
221- const height = $activeElement . outerHeight ( ) ;
222- const x = currentWindowPos . x + offset . left ,
223- y = currentWindowPos . y + titlebarHeightIfAny + offset . top ;
224- const newSize = new window . __TAURI__ . window . LogicalSize ( width , height ) ;
225- const newPosition = new window . __TAURI__ . window . LogicalPosition ( x , y ) ;
212+ const newSize = await currentWindow . innerSize ( ) ;
213+ const newPosition = await currentWindow . innerPosition ( ) ;
214+ newPosition . y = newPosition . y + 28 ;
215+ newSize . height = newSize . height - 28 ;
226216 return { newSize, newPosition} ;
227217 }
228218
@@ -233,11 +223,11 @@ define(function (require, exports, module) {
233223 return { newSize, newPosition} ;
234224 }
235225
236- async function _computeNewPositionAndSize ( $activeElement ) {
226+ async function _computeNewPositionAndSize ( ) {
237227 if ( Phoenix . platform === "win" ) {
238228 return _computeNewPositionAndSizeWindows ( ) ;
239229 }
240- return _computeNewPositionAndSizeWebkit ( $activeElement ) ;
230+ return _computeNewPositionAndSizeWebkit ( ) ;
241231 }
242232
243233 async function showAndResizeFileDropWindow ( event ) {
0 commit comments