fix wayland Display::all() comment (#8664)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
		
							parent
							
								
									f07936a911
								
							
						
					
					
						commit
						e2d217a138
					
				| @ -59,7 +59,7 @@ impl Display { | ||||
|         }) | ||||
|     } | ||||
| 
 | ||||
|     // Call this function carefully for wayland, it may cause blocking
 | ||||
|     // Currently, wayland need to call wayland::clear() before call Display::all()
 | ||||
|     pub fn all() -> io::Result<Vec<Display>> { | ||||
|         Ok(if super::is_x11() { | ||||
|             x11::Display::all()? | ||||
|  | ||||
| @ -186,7 +186,7 @@ fn check_get_displays_changed_msg() -> Option<Message> { | ||||
| pub fn check_displays_changed() -> ResultType<()> { | ||||
|     #[cfg(target_os = "linux")] | ||||
|     { | ||||
|         // For wayland, call Display::all() in video service will cause block, reproduced by refresh, I don't know the reason.
 | ||||
|         // Currently, wayland need to call wayland::clear() before call Display::all(), otherwise it will cause
 | ||||
|         // block, or even crash here, https://github.com/rustdesk/rustdesk/blob/0bb4d43e9ea9d9dfb9c46c8d27d1a97cd0ad6bea/libs/scrap/src/wayland/pipewire.rs#L235
 | ||||
|         if !is_x11() { | ||||
|             return Ok(()); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user