]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #2095 from Airblader/bug-2090
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Fri, 4 Dec 2015 08:02:51 +0000 (09:02 +0100)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Fri, 4 Dec 2015 08:02:51 +0000 (09:02 +0100)
Allow "move position center" to operate on matched windows

libi3/draw_util.c
src/x.c

index e33a9ecbd4a05a8750abea3536b7bdc68013e2ca..fa538d1a24b16216703f3a422cc2c7ca441c3ffd 100644 (file)
@@ -47,8 +47,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw
 
     xcb_generic_error_t *error = xcb_request_check(conn, gc_cookie);
     if (error != NULL) {
-        ELOG("Could not create graphical context. Error code: %d\n", error->error_code);
-        exit(EXIT_FAILURE);
+        ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code);
     }
 
 #ifdef CAIRO_SUPPORT
diff --git a/src/x.c b/src/x.c
index f1f971e94286fec0c1422f3375def5ca867462f7..faa892aa06b4422ce105df3414522b60e5fb63b5 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -783,8 +783,8 @@ void x_push_node(Con *con) {
             /* Ensure we have valid dimensions for our surface. */
             // TODO This is probably a bug in the condition above as we should never enter this path
             //      for height == 0. Also, we should probably handle width == 0 the same way.
-            int width = MAX(rect.width, 1);
-            int height = MAX(rect.height, 1);
+            int width = MAX((int32_t)rect.width, 1);
+            int height = MAX((int32_t)rect.height, 1);
 
             xcb_create_pixmap_checked(conn, win_depth, con->frame_buffer.id, con->frame.id, width, height);
             draw_util_surface_init(conn, &(con->frame_buffer), con->frame_buffer.id,