mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Merge branch 'master' into feature/data-device-selection
This commit is contained in:
		
						commit
						39308cb868
					
				
					 2 changed files with 9 additions and 5 deletions
				
			
		| 
						 | 
					@ -66,10 +66,12 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (!buf) {
 | 
						if (!buf) {
 | 
				
			||||||
		// Hide cursor
 | 
							// Hide cursor
 | 
				
			||||||
 | 
							if (output->cursor_surface) {
 | 
				
			||||||
			wl_surface_destroy(output->cursor_surface);
 | 
								wl_surface_destroy(output->cursor_surface);
 | 
				
			||||||
			munmap(output->cursor_data, output->cursor_buf_size);
 | 
								munmap(output->cursor_data, output->cursor_buf_size);
 | 
				
			||||||
			output->cursor_surface = NULL;
 | 
								output->cursor_surface = NULL;
 | 
				
			||||||
			output->cursor_buf_size = 0;
 | 
								output->cursor_buf_size = 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x,
 | 
							wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x,
 | 
				
			||||||
			hotspot_y);
 | 
								hotspot_y);
 | 
				
			||||||
		return true;
 | 
							return true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -361,7 +361,9 @@ void wlr_output_swap_buffers(struct wlr_output *output) {
 | 
				
			||||||
			renderer = output->cursor.surface->renderer;
 | 
								renderer = output->cursor.surface->renderer;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (texture && renderer) {
 | 
							// We check texture->valid because some clients set a cursor surface
 | 
				
			||||||
 | 
							// with a NULL buffer to hide it
 | 
				
			||||||
 | 
							if (renderer && texture && texture->valid) {
 | 
				
			||||||
			float matrix[16];
 | 
								float matrix[16];
 | 
				
			||||||
			wlr_texture_get_matrix(texture, &matrix, &output->transform_matrix,
 | 
								wlr_texture_get_matrix(texture, &matrix, &output->transform_matrix,
 | 
				
			||||||
				output->cursor.x, output->cursor.y);
 | 
									output->cursor.x, output->cursor.y);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue