mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output: refuse to scan-out if software cursors are used
This commit is contained in:
		
							parent
							
								
									67cd84de45
								
							
						
					
					
						commit
						e554c593f9
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -497,6 +497,17 @@ bool wlr_output_attach_buffer(struct wlr_output *output,
 | 
				
			||||||
	if (!output->impl->attach_buffer) {
 | 
						if (!output->impl->attach_buffer) {
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// If the output has at least one software cursor, refuse to attach the
 | 
				
			||||||
 | 
						// buffer
 | 
				
			||||||
 | 
						struct wlr_output_cursor *cursor;
 | 
				
			||||||
 | 
						wl_list_for_each(cursor, &output->cursors, link) {
 | 
				
			||||||
 | 
							if (cursor->enabled && cursor->visible &&
 | 
				
			||||||
 | 
									cursor != output->hardware_cursor) {
 | 
				
			||||||
 | 
								return false;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!output->impl->attach_buffer(output, buffer)) {
 | 
						if (!output->impl->attach_buffer(output, buffer)) {
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue