-#undef I3__FILE__
-#define I3__FILE__ "resize.c"
/*
* vim:ts=4:sw=4:expandtab
*
*/
#include "all.h"
-extern xcb_connection_t *conn;
-
/*
* This is an ugly data structure which we need because there is no standard
* way of having nested functions (only available as a gcc extension at the
xcb_flush(conn);
}
-bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction) {
+bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction, bool both_sides) {
DLOG("Find two participants for resizing container=%p in direction=%i\n", other, direction);
Con *first = *current;
Con *second = NULL;
/* get the counterpart for this resizement */
if (dir_backwards) {
second = TAILQ_PREV(first, nodes_head, nodes);
+ if (second == NULL && both_sides == true) {
+ second = TAILQ_NEXT(first, nodes);
+ }
} else {
second = TAILQ_NEXT(first, nodes);
+ if (second == NULL && both_sides == true) {
+ second = TAILQ_PREV(first, nodes_head, nodes);
+ }
}
if (second == NULL) {
}
mask = XCB_CW_BACK_PIXEL;
- values[0] = config.client.focused.border;
+ values[0] = config.client.focused.border.colorpixel;
mask |= XCB_CW_OVERRIDE_REDIRECT;
values[1] = 1;