titlebar: remove old position attribute
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
49abc66089
commit
adf732dd9f
14
client.c
14
client.c
|
@ -668,12 +668,6 @@ client_setfullscreen(client_t *c, bool s)
|
||||||
/* become fullscreen! */
|
/* become fullscreen! */
|
||||||
if((c->isfullscreen = s))
|
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);
|
geometry = screen_area_get(c->screen, NULL, &globalconf.screens[c->screen].padding, false);
|
||||||
c->m_geometry = c->geometry;
|
c->m_geometry = c->geometry;
|
||||||
c->oldborder = c->border;
|
c->oldborder = c->border;
|
||||||
|
@ -681,9 +675,6 @@ client_setfullscreen(client_t *c, bool s)
|
||||||
}
|
}
|
||||||
else
|
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;
|
geometry = c->m_geometry;
|
||||||
client_setborder(c, c->oldborder);
|
client_setborder(c, c->oldborder);
|
||||||
client_resize(c, c->m_geometry, false);
|
client_resize(c, c->m_geometry, false);
|
||||||
|
@ -783,7 +774,12 @@ client_unban(client_t *c)
|
||||||
xcb_map_window(globalconf.connection, c->win);
|
xcb_map_window(globalconf.connection, c->win);
|
||||||
window_state_set(c->win, XCB_WM_STATE_NORMAL);
|
window_state_set(c->win, XCB_WM_STATE_NORMAL);
|
||||||
if(c->titlebar && c->titlebar->sw && c->titlebar->position)
|
if(c->titlebar && c->titlebar->sw && c->titlebar->position)
|
||||||
|
{
|
||||||
|
if(c->isfullscreen)
|
||||||
|
xcb_unmap_window(globalconf.connection, c->titlebar->sw->window);
|
||||||
|
else
|
||||||
xcb_map_window(globalconf.connection, c->titlebar->sw->window);
|
xcb_map_window(globalconf.connection, c->titlebar->sw->window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Unmanage a client.
|
/** Unmanage a client.
|
||||||
|
|
|
@ -175,7 +175,7 @@ struct titlebar_t
|
||||||
/** Ref count */
|
/** Ref count */
|
||||||
int refcount;
|
int refcount;
|
||||||
/** Position */
|
/** Position */
|
||||||
position_t position, oldposition;
|
position_t position;
|
||||||
/** Alignment on window */
|
/** Alignment on window */
|
||||||
alignment_t align;
|
alignment_t align;
|
||||||
/** Widgets */
|
/** Widgets */
|
||||||
|
|
Loading…
Reference in New Issue