]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #1608 from mh21/renaming-empty-ws-startup
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Mon, 30 Mar 2015 20:01:18 +0000 (22:01 +0200)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Mon, 30 Mar 2015 20:01:18 +0000 (22:01 +0200)
Update old_name when renaming current workspace

1  2 
src/commands.c

diff --combined src/commands.c
index 227c7fb108739bbb6a7e2e9327e3cf48d0e9459e,589c49ad300af1b91c695606541159ce5debed57..2c709aef7a77106cb4505b164218c8f93e28c637
@@@ -1776,8 -1776,8 +1776,8 @@@ void cmd_move_window_to_center(I3_CMD, 
          Rect newrect = focused->parent->rect;
  
          DLOG("moving to center\n");
 -        newrect.x = wsrect->width / 2 - newrect.width / 2;
 -        newrect.y = wsrect->height / 2 - newrect.height / 2;
 +        newrect.x = wsrect->x + wsrect->width / 2 - newrect.width / 2;
 +        newrect.y = wsrect->y + wsrect->height / 2 - newrect.height / 2;
  
          floating_reposition(focused->parent, newrect);
      }
@@@ -1851,6 -1851,7 +1851,7 @@@ void cmd_rename_workspace(I3_CMD, char 
                     !strcasecmp(child->name, old_name));
      } else {
          workspace = con_get_workspace(focused);
+         old_name = workspace->name;
      }
  
      if (!workspace) {