mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	rootston: Keep focus unchanged when non-focusable element clicked
Before this change, a view would lose focus after clicking something that's not keyboard-interactive. This would lead to edge cases with layer-shell windows like input methods, which are pointer-only-interactive, but are not intended to change the state of any focus.
This commit is contained in:
		
							parent
							
								
									fa13493ad5
								
							
						
					
					
						commit
						a94c56a828
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -273,7 +273,9 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
 | 
			
		|||
			}
 | 
			
		||||
			break;
 | 
			
		||||
		case WLR_BUTTON_PRESSED:
 | 
			
		||||
			roots_seat_set_focus(seat, view);
 | 
			
		||||
			if (view) {
 | 
			
		||||
				roots_seat_set_focus(seat, view);
 | 
			
		||||
			}
 | 
			
		||||
			if (surface && wlr_surface_is_layer_surface(surface)) {
 | 
			
		||||
				struct wlr_layer_surface *layer =
 | 
			
		||||
					wlr_layer_surface_from_wlr_surface(surface);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue