mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 16:36:26 +01:00
Fixes to make floating windows work better
This commit is contained in:
parent
3e950c2b1c
commit
7137be9a3f
2 changed files with 1 additions and 4 deletions
|
@ -345,10 +345,10 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
|
||||||
int dx = mouse_origin.x - prev_pos.x;
|
int dx = mouse_origin.x - prev_pos.x;
|
||||||
int dy = mouse_origin.y - prev_pos.y;
|
int dy = mouse_origin.y - prev_pos.y;
|
||||||
sway_log(L_DEBUG, "Moving from px: %d to cx: %d and from py: %d to cy: %d", prev_pos.x, mouse_origin.x, prev_pos.y, mouse_origin.y);
|
sway_log(L_DEBUG, "Moving from px: %d to cx: %d and from py: %d to cy: %d", prev_pos.x, mouse_origin.x, prev_pos.y, mouse_origin.y);
|
||||||
sway_log(L_DEBUG, "Moving: dx: %d, dy: %d", dx, dy);
|
|
||||||
|
|
||||||
view->x += dx;
|
view->x += dx;
|
||||||
view->y += dy;
|
view->y += dy;
|
||||||
|
changed_floating = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,6 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
|
||||||
int dx = mouse_origin.x - prev_pos.x;
|
int dx = mouse_origin.x - prev_pos.x;
|
||||||
int dy = mouse_origin.y - prev_pos.y;
|
int dy = mouse_origin.y - prev_pos.y;
|
||||||
sway_log(L_DEBUG, "Moving from px: %d to cx: %d and from py: %d to cy: %d", prev_pos.x, mouse_origin.x, prev_pos.y, mouse_origin.y);
|
sway_log(L_DEBUG, "Moving from px: %d to cx: %d and from py: %d to cy: %d", prev_pos.x, mouse_origin.x, prev_pos.y, mouse_origin.y);
|
||||||
sway_log(L_INFO, "Moving: dx: %d, dy: %d", dx, dy);
|
|
||||||
|
|
||||||
// Move and resize the view based on the dx/dy and mouse position
|
// Move and resize the view based on the dx/dy and mouse position
|
||||||
int midway_x = view->x + view->width/2;
|
int midway_x = view->x + view->width/2;
|
||||||
|
|
|
@ -237,8 +237,6 @@ void arrange_windows(swayc_t *container, int width, int height) {
|
||||||
wlc_view_bring_to_front(view->handle);
|
wlc_view_bring_to_front(view->handle);
|
||||||
} else {
|
} else {
|
||||||
wlc_view_set_geometry(view->handle, 0, &geometry);
|
wlc_view_set_geometry(view->handle, 0, &geometry);
|
||||||
view->width = width;
|
|
||||||
view->height = height;
|
|
||||||
// Bring the views to the front in order of the list, the list
|
// Bring the views to the front in order of the list, the list
|
||||||
// will be kept up to date so that more recently focused views
|
// will be kept up to date so that more recently focused views
|
||||||
// have higher indexes
|
// have higher indexes
|
||||||
|
|
Loading…
Reference in a new issue