mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	cursor: add wlr_cursor_unset_image()
It's pretty awkward to call wlr_cursor_set_image() with 6 zeroes. Hide that awkwardness in wlroots.
This commit is contained in:
		
							parent
							
								
									da04b066ea
								
							
						
					
					
						commit
						220402b717
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -147,6 +147,11 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
 | 
			
		|||
	int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x,
 | 
			
		||||
	int32_t hotspot_y, float scale);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Hide the cursor image.
 | 
			
		||||
 */
 | 
			
		||||
void wlr_cursor_unset_image(struct wlr_cursor *cur);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Set the cursor image from an XCursor theme.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -425,6 +425,10 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wlr_cursor_unset_image(struct wlr_cursor *cur) {
 | 
			
		||||
	wlr_cursor_set_image(cur, NULL, 0, 0, 0, 0, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wlr_cursor_set_xcursor(struct wlr_cursor *cur,
 | 
			
		||||
		struct wlr_xcursor_manager *manager, const char *name) {
 | 
			
		||||
	struct wlr_cursor_output_cursor *output_cursor;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue