mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	xwayland.c: fix position bug
Set node position in the configure/set_geometry handlers when moving a window in response to a client request. Steps to reproduce weird positioning fixed by this patch: 1. Start leafpad 2. Open Help->About 3. Move the dialog 4. Close the dialog 5. Open it again 6. Drag it and observe a jump in position There is also an xwayland PyQt5 script in PR #428 which demonstrates jumpy position.
This commit is contained in:
		
							parent
							
								
									9b49f19a73
								
							
						
					
					
						commit
						bfff9d02c7
					
				
					 2 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -35,6 +35,8 @@ unmanaged_handle_set_geometry(struct wl_listener *listener, void *data)
 | 
				
			||||||
		wlr_log(WLR_DEBUG, "xwayland-unmanaged surface has moved");
 | 
							wlr_log(WLR_DEBUG, "xwayland-unmanaged surface has moved");
 | 
				
			||||||
		unmanaged->lx = xsurface->x;
 | 
							unmanaged->lx = xsurface->x;
 | 
				
			||||||
		unmanaged->ly = xsurface->y;
 | 
							unmanaged->ly = xsurface->y;
 | 
				
			||||||
 | 
							wlr_scene_node_set_position(unmanaged->node,
 | 
				
			||||||
 | 
								unmanaged->lx, unmanaged->ly);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -151,6 +151,7 @@ handle_request_configure(struct wl_listener *listener, void *data)
 | 
				
			||||||
	view->pending_move_resize.width = width;
 | 
						view->pending_move_resize.width = width;
 | 
				
			||||||
	view->pending_move_resize.height = height;
 | 
						view->pending_move_resize.height = height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wlr_scene_node_set_position(&view->scene_tree->node, event->x, event->y);
 | 
				
			||||||
	wlr_xwayland_surface_configure(view->xwayland_surface,
 | 
						wlr_xwayland_surface_configure(view->xwayland_surface,
 | 
				
			||||||
		event->x, event->y, width, height);
 | 
							event->x, event->y, width, height);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue