mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #2196 from emersion/xwayland-floating-resize
Fix xwayland floating views unclickable
This commit is contained in:
		
						commit
						fc4ed6f037
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -283,7 +283,10 @@ static void handle_commit(struct wl_listener *listener, void *data) {
 | 
				
			||||||
	if (view->swayc->instructions->length) {
 | 
						if (view->swayc->instructions->length) {
 | 
				
			||||||
		transaction_notify_view_ready_by_size(view,
 | 
							transaction_notify_view_ready_by_size(view,
 | 
				
			||||||
				surface_state->width, surface_state->height);
 | 
									surface_state->width, surface_state->height);
 | 
				
			||||||
 | 
						} else if (container_is_floating(view->swayc)) {
 | 
				
			||||||
 | 
							view_update_size(view, surface_state->width, surface_state->height);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	view_damage_from(view);
 | 
						view_damage_from(view);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -574,6 +574,8 @@ void view_update_position(struct sway_view *view, double lx, double ly) {
 | 
				
			||||||
	container_damage_whole(view->swayc);
 | 
						container_damage_whole(view->swayc);
 | 
				
			||||||
	view->x = lx;
 | 
						view->x = lx;
 | 
				
			||||||
	view->y = ly;
 | 
						view->y = ly;
 | 
				
			||||||
 | 
						view->swayc->current.view_x = lx;
 | 
				
			||||||
 | 
						view->swayc->current.view_y = ly;
 | 
				
			||||||
	if (container_is_floating(view->swayc)) {
 | 
						if (container_is_floating(view->swayc)) {
 | 
				
			||||||
		container_set_geometry_from_floating_view(view->swayc);
 | 
							container_set_geometry_from_floating_view(view->swayc);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -587,6 +589,8 @@ void view_update_size(struct sway_view *view, int width, int height) {
 | 
				
			||||||
	container_damage_whole(view->swayc);
 | 
						container_damage_whole(view->swayc);
 | 
				
			||||||
	view->width = width;
 | 
						view->width = width;
 | 
				
			||||||
	view->height = height;
 | 
						view->height = height;
 | 
				
			||||||
 | 
						view->swayc->current.view_width = width;
 | 
				
			||||||
 | 
						view->swayc->current.view_height = height;
 | 
				
			||||||
	if (container_is_floating(view->swayc)) {
 | 
						if (container_is_floating(view->swayc)) {
 | 
				
			||||||
		container_set_geometry_from_floating_view(view->swayc);
 | 
							container_set_geometry_from_floating_view(view->swayc);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue