rpms/i3/F-12 i3-3.d-bf1-1dcb4a39fd676441c30ce5614c2ae6082114837d.patch, NONE, 1.1 i3-3.d-bf1-4c87170494cbdd680cb4b128dd60fcdaac995609.patch, NONE, 1.1 i3-3.d-bf1-505eaaf3490c21de00e636d012f513f4334ed5c3.patch, NONE, 1.1 i3-3.d-bf1-6de212f7eec993346d24af5333ceedfe7849a2f6.patch, NONE, 1.1 i3-3.d-bf1-86b0dab7ea8b0252fe30506b08074f4ef4798219.patch, NONE, 1.1 i3-3.d-bf1-8adce413f5f92bd8e4c485ee61ff6b8448cd2058.patch, NONE, 1.1 i3-3.d-bf1-9dce0818378feefe0aa7844f51f48e03a01607dc.patch, NONE, 1.1 i3-3.d-bf1-aaf46bfc55dccf57962ac12d804b6886620c20fc.patch, NONE, 1.1 i3-3.d-bf1-d1a0e930a8698deb32d8356bc13403fdd86e2b78.patch, NONE, 1.1 i3-3.d-bf1-f399c3ef9d0db8c95113b242e0c69498cf077669.patch, NONE, 1.1 i3.spec, 1.5, 1.6

Simon Wesp cassmodiah at fedoraproject.org
Wed Feb 3 22:10:48 UTC 2010


Author: cassmodiah

Update of /cvs/pkgs/rpms/i3/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28835

Modified Files:
	i3.spec 
Added Files:
	i3-3.d-bf1-1dcb4a39fd676441c30ce5614c2ae6082114837d.patch 
	i3-3.d-bf1-4c87170494cbdd680cb4b128dd60fcdaac995609.patch 
	i3-3.d-bf1-505eaaf3490c21de00e636d012f513f4334ed5c3.patch 
	i3-3.d-bf1-6de212f7eec993346d24af5333ceedfe7849a2f6.patch 
	i3-3.d-bf1-86b0dab7ea8b0252fe30506b08074f4ef4798219.patch 
	i3-3.d-bf1-8adce413f5f92bd8e4c485ee61ff6b8448cd2058.patch 
	i3-3.d-bf1-9dce0818378feefe0aa7844f51f48e03a01607dc.patch 
	i3-3.d-bf1-aaf46bfc55dccf57962ac12d804b6886620c20fc.patch 
	i3-3.d-bf1-d1a0e930a8698deb32d8356bc13403fdd86e2b78.patch 
	i3-3.d-bf1-f399c3ef9d0db8c95113b242e0c69498cf077669.patch 
Log Message:
* Wed Feb 03 2010 Simon Wesp <cassmodiah at fedoraproject.org> - 3.d.bf1-4
- Some bugfixes (sync with upstream)
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=6de212f7eec993346d24af5333ceedfe7849a2f6
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=aaf46bfc55dccf57962ac12d804b6886620c20fc
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=1dcb4a39fd676441c30ce5614c2ae6082114837d
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=d1a0e930a8698deb32d8356bc13403fdd86e2b78
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=86b0dab7ea8b0252fe30506b08074f4ef4798219
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=505eaaf3490c21de00e636d012f513f4334ed5c3
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=8adce413f5f92bd8e4c485ee61ff6b8448cd2058
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=4c87170494cbdd680cb4b128dd60fcdaac995609
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=9dce0818378feefe0aa7844f51f48e03a01607dc
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=f399c3ef9d0db8c95113b242e0c69498cf077669
- Add Patch http://code.stapelberg.de/git/i3/commit/?id=d1a0e930a8698deb32d8356bc13403fdd86e2b78


i3-3.d-bf1-1dcb4a39fd676441c30ce5614c2ae6082114837d.patch:
 xcb.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE i3-3.d-bf1-1dcb4a39fd676441c30ce5614c2ae6082114837d.patch ---
>From 1dcb4a39fd676441c30ce5614c2ae6082114837d Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Thu, 07 Jan 2010 18:24:46 +0100
Subject: Use LOG instead of DLOG (next branch feature only)

---
diff --git a/src/xcb.c b/src/xcb.c
index 98b6bde..ee75ca2 100644
--- i3-3.d-bf1.orig/src/xcb.c
+++ i3-3.d-bf1/src/xcb.c
@@ -359,7 +359,7 @@ int predict_text_width(xcb_connection_t *conn, const char *font_pattern, char *t
 
         /* If no per-char info is available for this font, we use the default */
         if (xcb_query_font_char_infos_length(font_info) == 0) {
-                DLOG("Falling back on default char_width of %d pixels\n", font_info->max_bounds.character_width);
+                LOG("Falling back on default char_width of %d pixels\n", font_info->max_bounds.character_width);
                 return (font_info->max_bounds.character_width * length);
         }
 
--
cgit v0.8.3

i3-3.d-bf1-4c87170494cbdd680cb4b128dd60fcdaac995609.patch:
 floating.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE i3-3.d-bf1-4c87170494cbdd680cb4b128dd60fcdaac995609.patch ---
>From 4c87170494cbdd680cb4b128dd60fcdaac995609 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Fri, 01 Jan 2010 16:29:11 +0100
Subject: We don’t have DLOG yet in master branch (Thanks ccount)

---
diff --git a/src/floating.c b/src/floating.c
index 07bc331..9302b02 100644
--- i3-3.d-bf1.orig/src/floating.c
+++ i3-3.d-bf1/src/floating.c
@@ -42,7 +42,7 @@ void toggle_floating_mode(xcb_connection_t *conn, Client *client, bool automatic
         i3Font *font = load_font(conn, config.font);
 
         if (client->dock) {
-                DLOG("Not putting dock client into floating mode\n");
+                LOG("Not putting dock client into floating mode\n");
                 return;
         }
 
--
cgit v0.8.3

i3-3.d-bf1-505eaaf3490c21de00e636d012f513f4334ed5c3.patch:
 include/table.h |    2 +-
 src/click.c     |    8 ++++----
 src/commands.c  |   20 ++++++++++----------
 src/table.c     |   11 +++++------
 4 files changed, 20 insertions(+), 21 deletions(-)

--- NEW FILE i3-3.d-bf1-505eaaf3490c21de00e636d012f513f4334ed5c3.patch ---
>From 505eaaf3490c21de00e636d012f513f4334ed5c3 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Fri, 01 Jan 2010 21:40:50 +0100
Subject: Bugfix: Containers could lose their snap state (Thanks Atsutane)

When being on a different workspace than the one where the snapped
container is, the function to cleanup cols/rows would clean up too
much.
---
diff --git a/include/table.h b/include/table.h
index 1856147..6236bef 100644
--- i3-3.d-bf1.orig/include/table.h
+++ i3-3.d-bf1/include/table.h
@@ -48,7 +48,7 @@ void expand_table_cols_at_head(Workspace *workspace);
  * Performs simple bounds checking for the given column/row
  *
  */
-bool cell_exists(int col, int row);
+bool cell_exists(Workspace *ws, int col, int row);
 
 /**
  * Shrinks the table by "compacting" it, that is, removing completely empty
diff --git a/src/click.c b/src/click.c
index efb26ad..dbbc433 100644
--- i3-3.d-bf1.orig/src/click.c
+++ i3-3.d-bf1/src/click.c
@@ -211,7 +211,7 @@ static bool floating_mod_on_tiled_client(xcb_connection_t *conn, Client *client,
                 first = con->col + (con->colspan - 1);
                 LOG("column %d\n", first);
 
-                if (!cell_exists(first, con->row) ||
+                if (!cell_exists(ws, first, con->row) ||
                     (first == (ws->cols-1)))
                         return false;
 
@@ -239,7 +239,7 @@ static bool floating_mod_on_tiled_client(xcb_connection_t *conn, Client *client,
                    to_bottom < to_top) {
                 /* …bottom border */
                 first = con->row + (con->rowspan - 1);
-                if (!cell_exists(con->col, first) ||
+                if (!cell_exists(ws, con->col, first) ||
                     (first == (ws->rows-1)))
                         return false;
 
@@ -376,7 +376,7 @@ int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_
         } else if (event->event_y >= (client->rect.height - 2)) {
                 /* …bottom border */
                 first = con->row + (con->rowspan - 1);
-                if (!cell_exists(con->col, first) ||
+                if (!cell_exists(ws, con->col, first) ||
                     (first == (ws->rows-1)))
                         return 1;
 
@@ -394,7 +394,7 @@ int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_
                 first = con->col + (con->colspan - 1);
                 LOG("column %d\n", first);
 
-                if (!cell_exists(first, con->row) ||
+                if (!cell_exists(ws, first, con->row) ||
                     (first == (ws->cols-1)))
                         return 1;
 
diff --git a/src/commands.c b/src/commands.c
index 4ef03d9..d60de2c 100644
--- i3-3.d-bf1.orig/src/commands.c
+++ i3-3.d-bf1/src/commands.c
@@ -143,9 +143,9 @@ static void focus_thing(xcb_connection_t *conn, direction_t direction, thing_t t
                         if (focus_window_in_container(conn, container, direction))
                                 return;
 
-                if (direction == D_DOWN && cell_exists(current_col, current_row+1))
+                if (direction == D_DOWN && cell_exists(t_ws, current_col, current_row+1))
                         new_row = current_row + t_ws->table[current_col][current_row]->rowspan;
-                else if (direction == D_UP && cell_exists(current_col, current_row-1)) {
+                else if (direction == D_UP && cell_exists(c_ws, current_col, current_row-1)) {
                         /* Set new_row as a sane default, but it may get overwritten in a second */
                         new_row--;
 
@@ -186,9 +186,9 @@ static void focus_thing(xcb_connection_t *conn, direction_t direction, thing_t t
                         LOG("Fixed it to new col %d\n", new_col);
                 }
         } else if (direction == D_LEFT || direction == D_RIGHT) {
-                if (direction == D_RIGHT && cell_exists(current_col+1, current_row))
+                if (direction == D_RIGHT && cell_exists(t_ws, current_col+1, current_row))
                         new_col = current_col + t_ws->table[current_col][current_row]->colspan;
-                else if (direction == D_LEFT && cell_exists(current_col-1, current_row)) {
+                else if (direction == D_LEFT && cell_exists(t_ws, current_col-1, current_row)) {
                         /* Set new_col as a sane default, but it may get overwritten in a second */
                         new_col--;
 
@@ -451,7 +451,7 @@ static void snap_current_container(xcb_connection_t *conn, direction_t direction
         switch (direction) {
                 case D_LEFT:
                         /* Snap to the left is actually a move to the left and then a snap right */
-                        if (!cell_exists(container->col - 1, container->row) ||
+                        if (!cell_exists(container->workspace, container->col - 1, container->row) ||
                             CUR_TABLE[container->col-1][container->row]->currently_focused != NULL) {
                                 LOG("cannot snap to left - the cell is already used\n");
                                 return;
@@ -464,7 +464,7 @@ static void snap_current_container(xcb_connection_t *conn, direction_t direction
                         /* Check if the cell is used */
                         int new_col = container->col + container->colspan;
                         for (int i = 0; i < container->rowspan; i++)
-                                if (!cell_exists(new_col, container->row + i) ||
+                                if (!cell_exists(container->workspace, new_col, container->row + i) ||
                                     CUR_TABLE[new_col][container->row + i]->currently_focused != NULL) {
                                         LOG("cannot snap to right - the cell is already used\n");
                                         return;
@@ -484,7 +484,7 @@ static void snap_current_container(xcb_connection_t *conn, direction_t direction
                         break;
                 }
                 case D_UP:
-                        if (!cell_exists(container->col, container->row - 1) ||
+                        if (!cell_exists(container->workspace, container->col, container->row - 1) ||
                             CUR_TABLE[container->col][container->row-1]->currently_focused != NULL) {
                                 LOG("cannot snap to top - the cell is already used\n");
                                 return;
@@ -497,7 +497,7 @@ static void snap_current_container(xcb_connection_t *conn, direction_t direction
                         LOG("snapping down\n");
                         int new_row = container->row + container->rowspan;
                         for (int i = 0; i < container->colspan; i++)
-                                if (!cell_exists(container->col + i, new_row) ||
+                                if (!cell_exists(container->workspace, container->col + i, new_row) ||
                                     CUR_TABLE[container->col + i][new_row]->currently_focused != NULL) {
                                         LOG("cannot snap down - the cell is already used\n");
                                         return;
@@ -823,7 +823,7 @@ static void parse_resize_command(xcb_connection_t *conn, Client *last_focused, c
                 first = con->col + (con->colspan - 1);
                 LOG("column %d\n", first);
 
-                if (!cell_exists(first, con->row) ||
+                if (!cell_exists(ws, first, con->row) ||
                     (first == (ws->cols-1)))
                         return;
 
@@ -838,7 +838,7 @@ static void parse_resize_command(xcb_connection_t *conn, Client *last_focused, c
                 command += strlen("top");
         } else if (STARTS_WITH(command, "bottom")) {
                 first = con->row + (con->rowspan - 1);
-                if (!cell_exists(con->col, first) ||
+                if (!cell_exists(ws, con->col, first) ||
                     (first == (ws->rows-1)))
                         return;
 
diff --git a/src/table.c b/src/table.c
index eebe8de..4330ca1 100644
--- i3-3.d-bf1.orig/src/table.c
+++ i3-3.d-bf1/src/table.c
@@ -241,9 +241,9 @@ static void shrink_table_rows(Workspace *workspace) {
  * Performs simple bounds checking for the given column/row
  *
  */
-bool cell_exists(int col, int row) {
-        return (col >= 0 && col < c_ws->cols) &&
-               (row >= 0 && row < c_ws->rows);
+bool cell_exists(Workspace *ws, int col, int row) {
+        return (col >= 0 && col < ws->cols) &&
+               (row >= 0 && row < ws->rows);
 }
 
 static void free_container(xcb_connection_t *conn, Workspace *workspace, int col, int row) {
@@ -388,7 +388,7 @@ void fix_colrowspan(xcb_connection_t *conn, Workspace *workspace) {
                 if (con->colspan > 1) {
                         LOG("gots one with colspan %d (at %d c, %d r)\n", con->colspan, cols, rows);
                         while (con->colspan > 1 &&
-                               (!cell_exists(cols + (con->colspan-1), rows) ||
+                               (!cell_exists(workspace, cols + (con->colspan-1), rows) &&
                                 workspace->table[cols + (con->colspan - 1)][rows]->currently_focused != NULL))
                                 con->colspan--;
                         LOG("fixed it to %d\n", con->colspan);
@@ -396,7 +396,7 @@ void fix_colrowspan(xcb_connection_t *conn, Workspace *workspace) {
                 if (con->rowspan > 1) {
                         LOG("gots one with rowspan %d (at %d c, %d r)\n", con->rowspan, cols, rows);
                         while (con->rowspan > 1 &&
-                               (!cell_exists(cols, rows + (con->rowspan - 1)) ||
+                               (!cell_exists(workspace, cols, rows + (con->rowspan - 1)) &&
                                 workspace->table[cols][rows + (con->rowspan - 1)]->currently_focused != NULL))
                                 con->rowspan--;
                         LOG("fixed it to %d\n", con->rowspan);
--
cgit v0.8.3

i3-3.d-bf1-6de212f7eec993346d24af5333ceedfe7849a2f6.patch:
 i3.config |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

--- NEW FILE i3-3.d-bf1-6de212f7eec993346d24af5333ceedfe7849a2f6.patch ---
>From 6de212f7eec993346d24af5333ceedfe7849a2f6 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Tue, 29 Dec 2009 16:48:16 +0100
Subject: Fix bindings using the cursor keys in default config

---
diff --git a/i3.config b/i3.config
index 6b42963..48091ea 100644
--- i3-3.d-bf1.orig/i3.config
+++ i3-3.d-bf1/i3.config
@@ -48,10 +48,10 @@ bind Mod3+45 wcj
 bind Mod3+46 wck
 bind Mod3+47 wcl
 # (alternatively, you can use the cursor keys:)
-bindsym Mod3+Left h
-bindsym Mod3+Down j
-bindsym Mod3+Up k
-bindsym Mod3+Right l
+bindsym Mod3+Left wch
+bindsym Mod3+Down wcj
+bindsym Mod3+Up wck
+bindsym Mod3+Right wcl
 
 # Snap (Mod1+Control+j/k/l/;)
 bind Mod1+Control+44 sh
@@ -59,10 +59,10 @@ bind Mod1+Control+45 sj
 bind Mod1+Control+46 sk
 bind Mod1+Control+47 sl
 # (alternatively, you can use the cursor keys:)
-bindsym Mod1+Control+Left h
-bindsym Mod1+Control+Down j
-bindsym Mod1+Control+Up k
-bindsym Mod1+Control+Right l
+bindsym Mod1+Control+Left sh
+bindsym Mod1+Control+Down sj
+bindsym Mod1+Control+Up sk
+bindsym Mod1+Control+Right sl
 
 # Move (Mod1+Shift+j/k/l/;)
 bind Mod1+Shift+44 mh
@@ -70,10 +70,10 @@ bind Mod1+Shift+45 mj
 bind Mod1+Shift+46 mk
 bind Mod1+Shift+47 ml
 # (alternatively, you can use the cursor keys:)
-bindsym Mod1+Shift+Left h
-bindsym Mod1+Shift+Down j
-bindsym Mod1+Shift+Up k
-bindsym Mod1+Shift+Right l
+bindsym Mod1+Shift+Left mh
+bindsym Mod1+Shift+Down mj
+bindsym Mod1+Shift+Up mk
+bindsym Mod1+Shift+Right ml
 
 # Move Container (Mod3+Shift+j/k/l/;)
 bind Mod3+Shift+44 wcmh
--
cgit v0.8.3

i3-3.d-bf1-86b0dab7ea8b0252fe30506b08074f4ef4798219.patch:
 mainx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE i3-3.d-bf1-86b0dab7ea8b0252fe30506b08074f4ef4798219.patch ---
>From 86b0dab7ea8b0252fe30506b08074f4ef4798219 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Thu, 07 Jan 2010 12:36:52 +0100
Subject: Bugfix: Use ev_loop_new instead of ev_default_loop because the latter one blocks SIGCHLD (Thanks Ciprian)

SIGCHLD was inherited to child processes started by i3 and not
all of them unblocked it (shells generally did, though), leading to
zombie processes.
---
diff --git a/src/mainx.c b/src/mainx.c
index d847d6f..d82ecae 100644
--- i3-3.d-bf1.orig/src/mainx.c
+++ i3-3.d-bf1/src/mainx.c
@@ -266,7 +266,7 @@ int main(int argc, char *argv[], char *env[]) {
         }
 
         /* Initialize event loop using libev */
-        struct ev_loop *loop = ev_default_loop(0);
+        struct ev_loop *loop = ev_loop_new(0);
         if (loop == NULL)
                 die("Could not initialize libev. Bad LIBEV_FLAGS?\n");
 
--
cgit v0.8.3

i3-3.d-bf1-8adce413f5f92bd8e4c485ee61ff6b8448cd2058.patch:
 mainx.c |    2 --
 1 file changed, 2 deletions(-)

--- NEW FILE i3-3.d-bf1-8adce413f5f92bd8e4c485ee61ff6b8448cd2058.patch ---
>From 8adce413f5f92bd8e4c485ee61ff6b8448cd2058 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Fri, 01 Jan 2010 16:30:27 +0100
Subject: Remove superfluous #include <assert.h> (Thanks badboy)

---
diff --git a/src/mainx.c b/src/mainx.c
index 322e51e..d847d6f 100644
--- i3-3.d-bf1.orig/src/mainx.c
+++ i3-3.d-bf1/src/mainx.c
@@ -9,7 +9,6 @@
  *
  */
 #include <stdio.h>
-#include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
--
cgit v0.8.3

i3-3.d-bf1-9dce0818378feefe0aa7844f51f48e03a01607dc.patch:
 floating.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- NEW FILE i3-3.d-bf1-9dce0818378feefe0aa7844f51f48e03a01607dc.patch ---
>From 9dce0818378feefe0aa7844f51f48e03a01607dc Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Fri, 01 Jan 2010 15:19:42 +0100
Subject: Bugfix: Don’t put dock clients into floating mode (Thanks xeen)

---
diff --git a/src/floating.c b/src/floating.c
index 4177b6e..07bc331 100644
--- i3-3.d-bf1.orig/src/floating.c
+++ i3-3.d-bf1/src/floating.c
@@ -41,6 +41,11 @@ void toggle_floating_mode(xcb_connection_t *conn, Client *client, bool automatic
         Container *con = client->container;
         i3Font *font = load_font(conn, config.font);
 
+        if (client->dock) {
+                DLOG("Not putting dock client into floating mode\n");
+                return;
+        }
+
         if (con == NULL) {
                 LOG("This client is already in floating (container == NULL), re-inserting\n");
                 Client *next_tiling;
--
cgit v0.8.3

i3-3.d-bf1-aaf46bfc55dccf57962ac12d804b6886620c20fc.patch:
 cfgparse.l |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE i3-3.d-bf1-aaf46bfc55dccf57962ac12d804b6886620c20fc.patch ---
>From aaf46bfc55dccf57962ac12d804b6886620c20fc Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Fri, 08 Jan 2010 17:56:01 +0100
Subject: bugfix: lexer: return to INITIAL state (Thanks dirkson)

'floating_modifier' after 'workspace' did not work because of wrong
state
---
diff --git a/src/cfgparse.l b/src/cfgparse.l
index 6e4a867..1b636f1 100644
--- i3-3.d-bf1.orig/src/cfgparse.l
+++ bi3-3.d-bf1/src/cfgparse.l
@@ -33,7 +33,7 @@
 mode                            { return TOKMODE; }
 bind                            { BEGIN(BIND_COND); return TOKBIND; }
 bindsym                         { BEGIN(BINDSYM_COND); return TOKBINDSYM; }
-floating_modifier               { return TOKFLOATING_MODIFIER; }
+floating_modifier               { BEGIN(INITIAL); return TOKFLOATING_MODIFIER; }
 workspace                       { BEGIN(INITIAL); return TOKWORKSPACE; }
 screen                          { BEGIN(SCREEN_COND); return TOKSCREEN; }
 terminal                        { BEGIN(BIND_AWS_COND); return TOKTERMINAL; }
--
cgit v0.8.3

i3-3.d-bf1-d1a0e930a8698deb32d8356bc13403fdd86e2b78.patch:
 xcb.c |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

--- NEW FILE i3-3.d-bf1-d1a0e930a8698deb32d8356bc13403fdd86e2b78.patch ---
>From d1a0e930a8698deb32d8356bc13403fdd86e2b78 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Thu, 07 Jan 2010 13:38:00 +0100
Subject: Bugfix: if a font provides no per-char info for width, fall back to the default (Thanks Ciprian)

---
diff --git a/src/xcb.c b/src/xcb.c
index a2f813b..98b6bde 100644
--- i3-3.d-bf1.orig/src/xcb.c
+++ i3-3.d-bf1/src/xcb.c
@@ -344,10 +344,25 @@ static xcb_charinfo_t *get_charinfo(int col, int row, xcb_query_font_reply_t *fo
 int predict_text_width(xcb_connection_t *conn, const char *font_pattern, char *text, int length) {
         xcb_query_font_reply_t *font_info;
         xcb_charinfo_t *table;
+        xcb_generic_error_t *error;
         int i, width = 0;
         i3Font *font = load_font(conn, font_pattern);
 
-        font_info = xcb_query_font_reply(conn, xcb_query_font_unchecked(conn, font->id), NULL);
+        font_info = xcb_query_font_reply(conn, xcb_query_font(conn, font->id), &error);
+        if (error != NULL) {
+                fprintf(stderr, "ERROR: query font (X error code %d)\n", error->error_code);
+                /* We return the rather safe guess of 7 pixels, because a
+                 * rendering error is better than a crash. Plus, the user will
+                 * see the error on his stderr. */
+                return 7;
+        }
+
+        /* If no per-char info is available for this font, we use the default */
+        if (xcb_query_font_char_infos_length(font_info) == 0) {
+                DLOG("Falling back on default char_width of %d pixels\n", font_info->max_bounds.character_width);
+                return (font_info->max_bounds.character_width * length);
+        }
+
         table = xcb_query_font_char_infos(font_info);
 
         for (i = 0; i < 2 * length; i += 2) {
--
cgit v0.8.3

i3-3.d-bf1-f399c3ef9d0db8c95113b242e0c69498cf077669.patch:
 ipc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE i3-3.d-bf1-f399c3ef9d0db8c95113b242e0c69498cf077669.patch ---
>From f399c3ef9d0db8c95113b242e0c69498cf077669 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael at stapelberg.de>
Date: Fri, 22 Jan 2010 23:34:29 +0100
Subject: Bugfix: Don’t leak IPC socket to launched processes

---
diff --git a/src/ipc.c b/src/ipc.c
index 0bef2ea..c048cdf 100644
--- i3-3.d-bf1.orig/src/ipc.c
+++ i3-3.d-bf1/src/ipc.c
@@ -228,6 +228,8 @@ int ipc_create_socket(const char *filename) {
                 return -1;
         }
 
+        (void)fcntl(sockfd, F_SETFD, FD_CLOEXEC);
+
         struct sockaddr_un addr;
         memset(&addr, 0, sizeof(struct sockaddr_un));
         addr.sun_family = AF_LOCAL;
--
cgit v0.8.3


Index: i3.spec
===================================================================
RCS file: /cvs/pkgs/rpms/i3/F-12/i3.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- i3.spec	7 Jan 2010 11:02:40 -0000	1.5
+++ i3.spec	3 Feb 2010 22:10:47 -0000	1.6
@@ -2,7 +2,7 @@
 
 Name:           i3
 Version:        3.d.bf1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Improved tiling window manager
 
 Group:          User Interface/Desktops
@@ -12,6 +12,27 @@ Source0:        http://i3.zekjur.net/dow
 Source1:        %{name}-logo.svg
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Fix bindings using the cursor keys in default config
+Patch0: %{name}-%{upstream_version}-6de212f7eec993346d24af5333ceedfe7849a2f6.patch
+# Bugfix: Don’t put dock clients into floating mode (Thanks xeen)
+Patch1: %{name}-%{upstream_version}-9dce0818378feefe0aa7844f51f48e03a01607dc.patch
+# We don’t have DLOG yet in master branch (Thanks ccount)
+Patch2: %{name}-%{upstream_version}-4c87170494cbdd680cb4b128dd60fcdaac995609.patch
+# Remove superfluous #include <assert.h> (Thanks badboy)
+Patch3: %{name}-%{upstream_version}-8adce413f5f92bd8e4c485ee61ff6b8448cd2058.patch
+# Bugfix: Containers could lose their snap state (Thanks Atsutane)
+Patch4: %{name}-%{upstream_version}-505eaaf3490c21de00e636d012f513f4334ed5c3.patch
+# Bugfix: Use ev_loop_new instead of ev_default_loop because the latter one blocks SIGCHLD (Thanks Ciprian)
+Patch5: %{name}-%{upstream_version}-86b0dab7ea8b0252fe30506b08074f4ef4798219.patch
+# Bugfix: if a font provides no per-char info for width, fall back to the default (Thanks Ciprian)
+Patch6: %{name}-%{upstream_version}-d1a0e930a8698deb32d8356bc13403fdd86e2b78.patch
+# Use LOG instead of DLOG (next branch feature only)
+Patch7: %{name}-%{upstream_version}-1dcb4a39fd676441c30ce5614c2ae6082114837d.patch
+# bugfix: lexer: return to INITIAL state (Thanks dirkson)
+Patch8: %{name}-%{upstream_version}-aaf46bfc55dccf57962ac12d804b6886620c20fc.patch
+# Bugfix: Don’t leak IPC socket to launched processes
+Patch9: %{name}-%{upstream_version}-f399c3ef9d0db8c95113b242e0c69498cf077669.patch
+
 BuildRequires:  xcb-util-devel
 BuildRequires:  libxcb-devel
 BuildRequires:  xcb-proto
@@ -53,6 +74,17 @@ Asciidoc and doxygen generated documenta
 %prep
 %setup -q -n %{name}-%{upstream_version}
 
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+
 sed -e 's|CFLAGS += -Wunused|CFLAGS += -I/usr/include/libev|g' \
     -e 's|CFLAGS += -Wall|CFLAGS += %{optflags}|g' \
     -e 's|CFLAGS += -pipe|CFLAGS += |g' \
@@ -96,7 +128,7 @@ rm -rf %{buildroot}
 %{_bindir}/%{name}*
 %dir %{_sysconfdir}/%{name}/
 %config(noreplace) %{_sysconfdir}/%{name}/config
-%config %{_sysconfdir}/%{name}/welcome
+%config(noreplace) %{_sysconfdir}/%{name}/welcome
 %{_datadir}/xsessions/%{name}.desktop
 %{_mandir}/man1/%{name}*
 %{_datadir}/pixmaps/%{name}-logo.svg
@@ -108,6 +140,20 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Wed Feb 03 2010 Simon Wesp <cassmodiah at fedoraproject.org> - 3.d.bf1-4
+- Some bugfixes (sync with upstream)
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=6de212f7eec993346d24af5333ceedfe7849a2f6
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=aaf46bfc55dccf57962ac12d804b6886620c20fc
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=1dcb4a39fd676441c30ce5614c2ae6082114837d
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=d1a0e930a8698deb32d8356bc13403fdd86e2b78
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=86b0dab7ea8b0252fe30506b08074f4ef4798219
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=505eaaf3490c21de00e636d012f513f4334ed5c3
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=8adce413f5f92bd8e4c485ee61ff6b8448cd2058
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=4c87170494cbdd680cb4b128dd60fcdaac995609
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=9dce0818378feefe0aa7844f51f48e03a01607dc
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=f399c3ef9d0db8c95113b242e0c69498cf077669
+- Add Patch http://code.stapelberg.de/git/i3/commit/?id=d1a0e930a8698deb32d8356bc13403fdd86e2b78
+
 * Wed Jan 06 2010 Simon Wesp <cassmodiah at fedoraproject.org> - 3.d.bf1-3
 - Add Missing R: xorg-x11-fonts-misc
 - Add i3-logo as SOURCE1 and install it to DATADIR/pixmaps



More information about the scm-commits mailing list