mirror of
				https://github.com/DreamMaoMao/maomaowm.git
				synced 2025-11-03 09:01:47 -05:00 
			
		
		
		
	opt: wrong position of fcitx5 popup in wayland mode electron app when first input
This commit is contained in:
		
							parent
							
								
									dcc5db1908
								
							
						
					
					
						commit
						a58b8adefe
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -488,6 +488,7 @@ static void handle_text_input_enable(struct wl_listener *listener, void *data) {
 | 
			
		|||
		update_popups_position(relay);
 | 
			
		||||
		send_state_to_input_method(relay);
 | 
			
		||||
	}
 | 
			
		||||
	wlr_text_input_v3_send_done(text_input->input);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void handle_text_input_disable(struct wl_listener *listener,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3074,11 +3074,14 @@ void focusclient(Client *c, int lift) {
 | 
			
		|||
	/* Change cursor surface */
 | 
			
		||||
	motionnotify(0, NULL, 0, 0, 0, 0);
 | 
			
		||||
 | 
			
		||||
	// set text input focus
 | 
			
		||||
	// must before client_notify_enter,
 | 
			
		||||
	// otherwise the position of text_input will be wrong.
 | 
			
		||||
	dwl_im_relay_set_focus(dwl_input_method_relay, client_surface(c));
 | 
			
		||||
 | 
			
		||||
	/* Have a client, so focus its top-level wlr_surface */
 | 
			
		||||
	client_notify_enter(client_surface(c), wlr_seat_get_keyboard(seat));
 | 
			
		||||
 | 
			
		||||
	// set text input focus
 | 
			
		||||
	dwl_im_relay_set_focus(dwl_input_method_relay, client_surface(c));
 | 
			
		||||
	/* Activate the new client */
 | 
			
		||||
	client_activate_surface(client_surface(c), 1);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue