2
0
Эх сурвалжийг харах

Enabled mojo sdl2 mouse focus clickthrough.

Mark Sibly 8 жил өмнө
parent
commit
9b4df1a636

+ 5 - 3
modules/mojo/app/app.monkey2

@@ -88,8 +88,10 @@ Class AppInstance
 		If Not config config=New StringMap<String>
 		If Not config config=New StringMap<String>
 	
 	
 		_config=config
 		_config=config
-
+		
 		SDL_Init( SDL_INIT_VIDEO|SDL_INIT_JOYSTICK )
 		SDL_Init( SDL_INIT_VIDEO|SDL_INIT_JOYSTICK )
+		
+		SDL_SetHint( "SDL_MOUSE_FOCUS_CLICKTHROUGH","1" )
 
 
 		'possible fix for linux crashing at exit (can't reproduce myself).
 		'possible fix for linux crashing at exit (can't reproduce myself).
 		'		
 		'		
@@ -754,7 +756,7 @@ Class AppInstance
 			SendKeyEvent( EventType.KeyChar )
 			SendKeyEvent( EventType.KeyChar )
 			
 			
 		Case SDL_MOUSEBUTTONDOWN
 		Case SDL_MOUSEBUTTONDOWN
-		
+			
 			Local mevent:=Cast<SDL_MouseButtonEvent Ptr>( event )
 			Local mevent:=Cast<SDL_MouseButtonEvent Ptr>( event )
 			
 			
 			_window=Window.WindowForID( mevent->windowID )
 			_window=Window.WindowForID( mevent->windowID )
@@ -792,7 +794,7 @@ Class AppInstance
 			Endif
 			Endif
 		
 		
 		Case SDL_MOUSEBUTTONUP
 		Case SDL_MOUSEBUTTONUP
-		
+			
 			Local mevent:=Cast<SDL_MouseButtonEvent Ptr>( event )
 			Local mevent:=Cast<SDL_MouseButtonEvent Ptr>( event )
 			
 			
 			_window=Window.WindowForID( mevent->windowID )
 			_window=Window.WindowForID( mevent->windowID )