]> git.sur5r.net Git - i3/i3/blobdiff - src/resize.c
Bugfix: check bounds before accessing memory
[i3/i3] / src / resize.c
index 994fd69262fc205ab6b081cfe7efd8b33b691e33..f07fcec6a169fb9e478d48d8161a9d3ac3bc2ea0 100644 (file)
@@ -1,5 +1,3 @@
-#undef I3__FILE__
-#define I3__FILE__ "resize.c"
 /*
  * vim:ts=4:sw=4:expandtab
  *
@@ -11,8 +9,6 @@
  */
 #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
@@ -88,7 +84,7 @@ bool resize_find_tiling_participants(Con **current, Con **other, direction_t dir
         }
     }
 
-    DLOG("Found participants: first=%p and second=%p.", first, second);
+    DLOG("Found participants: first=%p and second=%p.\n", first, second);
     *current = first;
     *other = second;
     if (first == NULL || second == NULL) {
@@ -146,7 +142,7 @@ int resize_graphical_handler(Con *first, Con *second, orientation_t orientation,
     }
 
     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;