do not set hit test unconditionally on window creation (#7996)
This commit is contained in:
		
							parent
							
								
									6bfc09f53e
								
							
						
					
					
						commit
						71b1b35757
					
				| @ -166,12 +166,17 @@ impl WinitWindows { | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         winit_window.set_cursor_visible(window.cursor.visible); |         winit_window.set_cursor_visible(window.cursor.visible); | ||||||
|  | 
 | ||||||
|  |         // Do not set the cursor hittest on window creation if it's false, as it will always fail on some
 | ||||||
|  |         // platforms and log an unfixable warning.
 | ||||||
|  |         if !window.cursor.hit_test { | ||||||
|             if let Err(err) = winit_window.set_cursor_hittest(window.cursor.hit_test) { |             if let Err(err) = winit_window.set_cursor_hittest(window.cursor.hit_test) { | ||||||
|                 warn!( |                 warn!( | ||||||
|                     "Could not set cursor hit test for window {:?}: {:?}", |                     "Could not set cursor hit test for window {:?}: {:?}", | ||||||
|                     window.title, err |                     window.title, err | ||||||
|                 ); |                 ); | ||||||
|             } |             } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         self.entity_to_winit.insert(entity, winit_window.id()); |         self.entity_to_winit.insert(entity, winit_window.id()); | ||||||
|         self.winit_to_entity.insert(winit_window.id(), entity); |         self.winit_to_entity.insert(winit_window.id(), entity); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 François
						François