mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-10-29 05:40:12 -04:00 
			
		
		
		
	xwayland: set focus to XCB_POINTER_ROOT rather than XCB_NONE
Fixes an issue with keyboard grabs not working when no XWayland windows are focused.
This commit is contained in:
		
							parent
							
								
									5083efe18b
								
							
						
					
					
						commit
						f9199bb6d4
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -363,9 +363,13 @@ static void xwm_focus_window(struct wlr_xwm *xwm, | |||
| 	// We handle cases where focus_surface == xsurface because we
 | ||||
| 	// want to be able to deny FocusIn events.
 | ||||
| 	if (!xsurface) { | ||||
| 		// XCB_POINTER_ROOT is described in xcb documentation but isn't
 | ||||
| 		// actually defined in the headers. It's distinct from XCB_NONE
 | ||||
| 		// (which disables keyboard input entirely and causes issues
 | ||||
| 		// with keyboard grabs for e.g. popups).
 | ||||
| 		xcb_set_input_focus_checked(xwm->xcb_conn, | ||||
| 			XCB_INPUT_FOCUS_POINTER_ROOT, | ||||
| 			XCB_NONE, XCB_CURRENT_TIME); | ||||
| 			1L /*XCB_POINTER_ROOT*/, XCB_CURRENT_TIME); | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 John Lindgren
						John Lindgren