titlebar: remove old position attribute

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-09-20 11:28:50 +02:00
parent 49abc66089
commit adf732dd9f
2 changed files with 7 additions and 11 deletions

View file

@ -668,12 +668,6 @@ client_setfullscreen(client_t *c, bool s)
/* become fullscreen! */
if((c->isfullscreen = s))
{
/* disable titlebar and borders */
if(c->titlebar && c->titlebar->sw && (c->titlebar->oldposition = c->titlebar->position))
{
xcb_unmap_window(globalconf.connection, c->titlebar->sw->window);
c->titlebar->position = Off;
}
geometry = screen_area_get(c->screen, NULL, &globalconf.screens[c->screen].padding, false);
c->m_geometry = c->geometry;
c->oldborder = c->border;
@ -681,9 +675,6 @@ client_setfullscreen(client_t *c, bool s)
}
else
{
/* restore borders and titlebar */
if(c->titlebar && c->titlebar->sw && (c->titlebar->position = c->titlebar->oldposition))
xcb_map_window(globalconf.connection, c->titlebar->sw->window);
geometry = c->m_geometry;
client_setborder(c, c->oldborder);
client_resize(c, c->m_geometry, false);
@ -783,7 +774,12 @@ client_unban(client_t *c)
xcb_map_window(globalconf.connection, c->win);
window_state_set(c->win, XCB_WM_STATE_NORMAL);
if(c->titlebar && c->titlebar->sw && c->titlebar->position)
xcb_map_window(globalconf.connection, c->titlebar->sw->window);
{
if(c->isfullscreen)
xcb_unmap_window(globalconf.connection, c->titlebar->sw->window);
else
xcb_map_window(globalconf.connection, c->titlebar->sw->window);
}
}
/** Unmanage a client.

View file

@ -175,7 +175,7 @@ struct titlebar_t
/** Ref count */
int refcount;
/** Position */
position_t position, oldposition;
position_t position;
/** Alignment on window */
alignment_t align;
/** Widgets */