]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: rendering cache also needs to consider con->pixmap_recreated for borders
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 29 May 2011 11:03:36 +0000 (13:03 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 29 May 2011 11:20:41 +0000 (13:20 +0200)
src/x.c

diff --git a/src/x.c b/src/x.c
index 8aa05f91ec36a79a9e7d4adc9ffa66512d9490eb..0228cd23100e802cfc82c9bf5ff660177bb8d018 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -235,7 +235,7 @@ void x_window_kill(xcb_window_t window, kill_window_t kill_window) {
  *
  */
 void x_draw_decoration(Con *con) {
-    const Con *parent = con->parent;
+    Con *parent = con->parent;
     /* This code needs to run for:
      *  • leaf containers
      *  • non-leaf containers which are in a stacked/tabbed container
@@ -282,7 +282,8 @@ void x_draw_decoration(Con *con) {
 
     if (con->deco_render_params != NULL &&
         (con->window == NULL || !con->window->name_x_changed) &&
-        !con->parent->pixmap_recreated &&
+        !parent->pixmap_recreated &&
+        !con->pixmap_recreated &&
         memcmp(p, con->deco_render_params, sizeof(struct deco_render_params)) == 0) {
         DLOG("CACHE HIT, not re-rendering\n");
         free(p);
@@ -302,11 +303,12 @@ void x_draw_decoration(Con *con) {
     if (con->window != NULL && con->window->name_x_changed)
         con->window->name_x_changed = false;
 
-    con->parent->pixmap_recreated = false;
+    parent->pixmap_recreated = false;
+    con->pixmap_recreated = false;
 
     /* If the con is in fullscreen mode, the decoration height we work with is set to 0 */
     Rect deco_rect = con->deco_rect;
-    if (con_get_fullscreen_con(con->parent) == con)
+    if (con_get_fullscreen_con(parent) == con)
         deco_rect.height = 0;
 
     /* 2: draw the client.background, but only for the parts around the client_rect */
@@ -411,7 +413,7 @@ void x_draw_decoration(Con *con) {
 
     int indent_level = 0,
         indent_mult = 0;
-    Con *il_parent = con->parent;
+    Con *il_parent = parent;
     if (il_parent->layout != L_STACKED) {
         while (1) {
             DLOG("il_parent = %p, layout = %d\n", il_parent, il_parent->layout);