mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	x11 backend: Ignore expose if frame is pending
When resizing rootston with the mouse, the result is really slow. One can see that rootston needs quite a while for drawing the newly visible area. This is because every single expose event is handled on its own and causes (apparently) a full repaint or at least a swap. This commit improves things by only causing a new frame if none is pending already. With this change, there is almost no delay in rootston drawing the newly visible area. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
		
							parent
							
								
									52b058c2a3
								
							
						
					
					
						commit
						e79d924588
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -74,7 +74,7 @@ static void handle_x11_event(struct wlr_x11_backend *x11,
 | 
				
			||||||
		xcb_expose_event_t *ev = (xcb_expose_event_t *)event;
 | 
							xcb_expose_event_t *ev = (xcb_expose_event_t *)event;
 | 
				
			||||||
		struct wlr_x11_output *output =
 | 
							struct wlr_x11_output *output =
 | 
				
			||||||
			x11_output_from_window_id(x11, ev->window);
 | 
								x11_output_from_window_id(x11, ev->window);
 | 
				
			||||||
		if (output != NULL) {
 | 
							if (output != NULL && !output->wlr_output.frame_pending) {
 | 
				
			||||||
			wlr_output_send_frame(&output->wlr_output);
 | 
								wlr_output_send_frame(&output->wlr_output);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue