summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Mykyta Holubakha <hilobakho@gmail.com>2017-02-06 01:21:38 +0200
committerLibravatar Mykyta Holubakha <hilobakho@gmail.com>2017-02-06 02:59:23 +0200
commit4eae9b33e831712e2fb8844ce18fe20d86f5bfa1 (patch)
treeec1b80d701f095e14170b1225a0c010f8129e868
parentHandle xdg-positioner stuff (diff)
downloadsway-4eae9b33e831712e2fb8844ce18fe20d86f5bfa1.tar.gz
sway-4eae9b33e831712e2fb8844ce18fe20d86f5bfa1.tar.zst
sway-4eae9b33e831712e2fb8844ce18fe20d86f5bfa1.zip
xdg-positioner: log window placement
-rw-r--r--sway/handlers.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index e2ff37f7..d74d6252 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -310,6 +310,22 @@ static void positioner_place_window(wlc_handle handle) {
310 geo.origin.x -= geo.size.w / 2; 310 geo.origin.x -= geo.size.w / 2;
311 } 311 }
312 312
313 sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " "
314 "sized (%u,%u) offset by (%d,%d), "
315 "anchor rectangle sized (%u,%u) at (%d,%d), "
316 "anchor edges: %s %s, gravity: %s %s",
317 handle,
318 sr->w, sr->h, offset.x, offset.y,
319 anchor->size.w, anchor->size.h, anchor->origin.x, anchor->origin.y,
320 anchors & WLC_BIT_ANCHOR_TOP ? "top" :
321 (anchors & WLC_BIT_ANCHOR_BOTTOM ? "bottom" : "middle"),
322 anchors & WLC_BIT_ANCHOR_LEFT ? "left" :
323 (anchors & WLC_BIT_ANCHOR_RIGHT ? "right" : "center"),
324 gravity & WLC_BIT_GRAVITY_TOP ? "top" :
325 (gravity & WLC_BIT_GRAVITY_BOTTOM ? "bottom" : "middle"),
326 gravity & WLC_BIT_GRAVITY_LEFT ? "left" :
327 (gravity & WLC_BIT_GRAVITY_RIGHT ? "right" : "center"));
328
313 wlc_handle parent = wlc_view_get_parent(handle); 329 wlc_handle parent = wlc_view_get_parent(handle);
314 if (parent) { 330 if (parent) {
315 const struct wlc_geometry *pg = wlc_view_get_geometry(parent); 331 const struct wlc_geometry *pg = wlc_view_get_geometry(parent);