diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2017-02-06 01:21:38 +0200 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2017-02-06 02:59:23 +0200 |
commit | 4eae9b33e831712e2fb8844ce18fe20d86f5bfa1 (patch) | |
tree | ec1b80d701f095e14170b1225a0c010f8129e868 /sway | |
parent | 006bd0bc3f306f28b8af414c3d381fd8f96d850b (diff) |
xdg-positioner: log window placement
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 16 |
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) { geo.origin.x -= geo.size.w / 2; } + sway_log(L_DEBUG, "xdg-positioner: placing window %" PRIuPTR " " + "sized (%u,%u) offset by (%d,%d), " + "anchor rectangle sized (%u,%u) at (%d,%d), " + "anchor edges: %s %s, gravity: %s %s", + handle, + sr->w, sr->h, offset.x, offset.y, + anchor->size.w, anchor->size.h, anchor->origin.x, anchor->origin.y, + anchors & WLC_BIT_ANCHOR_TOP ? "top" : + (anchors & WLC_BIT_ANCHOR_BOTTOM ? "bottom" : "middle"), + anchors & WLC_BIT_ANCHOR_LEFT ? "left" : + (anchors & WLC_BIT_ANCHOR_RIGHT ? "right" : "center"), + gravity & WLC_BIT_GRAVITY_TOP ? "top" : + (gravity & WLC_BIT_GRAVITY_BOTTOM ? "bottom" : "middle"), + gravity & WLC_BIT_GRAVITY_LEFT ? "left" : + (gravity & WLC_BIT_GRAVITY_RIGHT ? "right" : "center")); + wlc_handle parent = wlc_view_get_parent(handle); if (parent) { const struct wlc_geometry *pg = wlc_view_get_geometry(parent); |