mirror of
https://github.com/wizbright/waybox.git
synced 2026-02-20 01:40:38 -05:00
Fix wrong resize anchor point
Previously, when dragging the left border of a window with the mouse, there was a bug where it would snap the top level surface's geometry X coordinate directly to the position of the mouse, as if you started the resize right on the border. This also affected the other (right, bottom, and top) borders. I think that the previous resize code was hard to understand. Honestly I have not spent a lot of time trying to understand why t didn't work and I wrote another resize algorithm instead. Now instead of working directly with widths and heights which are complicated we work with the borders (left, right, top and bottom). This is easier to understand IMO.
This commit is contained in:
parent
114e265eef
commit
8265eda78a
3 changed files with 46 additions and 28 deletions
|
|
@ -37,7 +37,7 @@ struct wb_server {
|
|||
|
||||
struct wb_view *grabbed_view;
|
||||
double grab_x, grab_y;
|
||||
int grab_width, grab_height;
|
||||
struct wlr_box grab_geo_box;
|
||||
uint32_t resize_edges;
|
||||
|
||||
struct wlr_xdg_shell *xdg_shell;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue