If we want to center a e_win, and it has a border, move it.
authorsebastid <sebastid>
Tue, 30 Aug 2005 10:42:47 +0000 (10:42 +0000)
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 30 Aug 2005 10:42:47 +0000 (10:42 +0000)
SVN revision: 16427

src/bin/e_win.c

index 59c5741..8272759 100644 (file)
@@ -328,6 +328,13 @@ e_win_centered_set(E_Win *win, int centered)
        win->state.centered = 1;
        _e_win_state_update(win);
      }
+   if (win->border)
+     {
+       /* The window is visible, move it to the right spot */
+       e_border_move(win->border,
+                     win->border->zone->x + (win->border->zone->w - win->border->w) / 2,
+                     win->border->zone->y + (win->border->zone->h - win->border->h) / 2);
+     }
 }
 
 /* local subsystem functions */