summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Luminarys <kizunanohikari@gmail.com>2015-08-18 18:03:11 -0500
committerLibravatar Luminarys <kizunanohikari@gmail.com>2015-08-18 18:03:23 -0500
commit7137be9a3fac4780c356d3f7a5d33c4235314a57 (patch)
treed4a19630fea612dd07da5aeffba0c0d6974a5335
parentBasic fixes to floating movement (diff)
downloadsway-7137be9a3fac4780c356d3f7a5d33c4235314a57.tar.gz
sway-7137be9a3fac4780c356d3f7a5d33c4235314a57.tar.zst
sway-7137be9a3fac4780c356d3f7a5d33c4235314a57.zip
Fixes to make floating windows work better
-rw-r--r--sway/handlers.c3
-rw-r--r--sway/layout.c2
2 files changed, 1 insertions, 4 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index d0915fe5..99d57529 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -345,10 +345,10 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
345 int dx = mouse_origin.x - prev_pos.x; 345 int dx = mouse_origin.x - prev_pos.x;
346 int dy = mouse_origin.y - prev_pos.y; 346 int dy = mouse_origin.y - prev_pos.y;
347 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); 347 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);
348 sway_log(L_DEBUG, "Moving: dx: %d, dy: %d", dx, dy);
349 348
350 view->x += dx; 349 view->x += dx;
351 view->y += dy; 350 view->y += dy;
351 changed_floating = true;
352 break; 352 break;
353 } 353 }
354 } 354 }
@@ -360,7 +360,6 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
360 int dx = mouse_origin.x - prev_pos.x; 360 int dx = mouse_origin.x - prev_pos.x;
361 int dy = mouse_origin.y - prev_pos.y; 361 int dy = mouse_origin.y - prev_pos.y;
362 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); 362 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);
363 sway_log(L_INFO, "Moving: dx: %d, dy: %d", dx, dy);
364 363
365 // Move and resize the view based on the dx/dy and mouse position 364 // Move and resize the view based on the dx/dy and mouse position
366 int midway_x = view->x + view->width/2; 365 int midway_x = view->x + view->width/2;
diff --git a/sway/layout.c b/sway/layout.c
index 7cb9186a..2f8027a8 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -237,8 +237,6 @@ void arrange_windows(swayc_t *container, int width, int height) {
237 wlc_view_bring_to_front(view->handle); 237 wlc_view_bring_to_front(view->handle);
238 } else { 238 } else {
239 wlc_view_set_geometry(view->handle, 0, &geometry); 239 wlc_view_set_geometry(view->handle, 0, &geometry);
240 view->width = width;
241 view->height = height;
242 // Bring the views to the front in order of the list, the list 240 // Bring the views to the front in order of the list, the list
243 // will be kept up to date so that more recently focused views 241 // will be kept up to date so that more recently focused views
244 // have higher indexes 242 // have higher indexes