Commit b514ecf 1 parent 6c3cf04 commit b514ecf Copy full SHA for b514ecf
File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,13 @@ fn main() {
183
183
let tray = SystemTray :: new ( ) . with_menu ( tray_menu) ;
184
184
185
185
tauri:: Builder :: default ( )
186
+ //Note: This is a workaround for a bug in tauri that causes the window to not resize properly inducing a noticable lag
187
+ // ! https://github.com/tauri-apps/tauri/issues/6322#issuecomment-1448141495
188
+ . on_window_event ( |e| {
189
+ if let WindowEvent :: Resized ( _) = e. event ( ) {
190
+ std:: thread:: sleep ( std:: time:: Duration :: from_nanos ( 1 ) ) ;
191
+ }
192
+ } )
186
193
. invoke_handler ( tauri:: generate_handler![
187
194
close_splashscreen,
188
195
run_mdns_query,
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const ExampleMenu = lazy(() => import('@components/NewWindow/Example'))
9
9
const ToastNotificationWindow = lazy ( ( ) => import ( '@components/Notifications' ) )
10
10
11
11
const App = ( ) => {
12
- const ref = document . getElementById ( 'titlebar' ) // TODO: this is a hack, need to figure out how to get the ref to the bound element
12
+ const ref = document . getElementById ( 'titlebar' )
13
13
onMount ( ( ) => {
14
14
handleTitlebar ( )
15
15
handleAppBoot ( )
You can’t perform that action at this time.
0 commit comments