]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 24 Aug 2011 20:43:15 +0000 (22:43 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 24 Aug 2011 20:43:15 +0000 (22:43 +0200)
Conflicts:
src/floating.c

1  2 
src/floating.c

diff --cc src/floating.c
index 20e37ec0ef570ff4a9a1e59adc7086d227f29a9e,99d768a5054d18c78a25667961b11f0f873cfd19..2abb223d787d119d7aa7dc9091223dafedec425f
@@@ -146,27 -163,6 +163,10 @@@ void floating_enable(Con *con, bool aut
      con->percent = 1.0;
      con->floating = FLOATING_USER_ON;
  
-     /* Some clients (like GIMP’s color picker window) get mapped
-      * to (0, 0), so we push them to a reasonable position
-      * (centered over their leader) */
-     if (nc->rect.x == 0 && nc->rect.y == 0) {
-         Con *leader;
-         if (con->window && con->window->leader != XCB_NONE &&
-             (leader = con_by_window_id(con->window->leader)) != NULL) {
-             DLOG("Centering above leader\n");
-             nc->rect.x = leader->rect.x + (leader->rect.width / 2) - (nc->rect.width / 2);
-             nc->rect.y = leader->rect.y + (leader->rect.height / 2) - (nc->rect.height / 2);
-         } else {
-             /* center the window on workspace as fallback */
-             nc->rect.x = ws->rect.x + (ws->rect.width / 2) - (nc->rect.width / 2);
-             nc->rect.y = ws->rect.y + (ws->rect.height / 2) - (nc->rect.height / 2);
-         }
-     }
 +    /* 4: set the border style as specified with new_float */
 +    if (automatic)
 +        con->border_style = config.default_floating_border;
 +
      TAILQ_INSERT_TAIL(&(nc->nodes_head), con, nodes);
      TAILQ_INSERT_TAIL(&(nc->focus_head), con, focused);