File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -296,14 +296,22 @@ where
296296 return ;
297297 } ;
298298
299- let window = match event_loop. create_window (
300- winit:: window:: WindowAttributes :: default ( ) . with_visible ( false ) ,
301- ) {
302- Ok ( window) => Arc :: new ( window) ,
303- Err ( error) => {
304- self . error = Some ( Error :: WindowCreationFailed ( error) ) ;
305- event_loop. exit ( ) ;
306- return ;
299+ let window = {
300+ let attributes = winit:: window:: WindowAttributes :: default ( ) ;
301+
302+ #[ cfg( target_os = "windows" ) ]
303+ let attributes = {
304+ use winit:: platform:: windows:: WindowAttributesExtWindows ;
305+ attributes. with_drag_and_drop ( false )
306+ } ;
307+
308+ match event_loop. create_window ( attributes. with_visible ( false ) ) {
309+ Ok ( window) => Arc :: new ( window) ,
310+ Err ( error) => {
311+ self . error = Some ( Error :: WindowCreationFailed ( error) ) ;
312+ event_loop. exit ( ) ;
313+ return ;
314+ }
307315 }
308316 } ;
309317
You can’t perform that action at this time.
0 commit comments