From adf732dd9ff1ed05234ce2652b8f7171d14e7477 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 20 Sep 2008 11:28:50 +0200 Subject: [PATCH] titlebar: remove old position attribute Signed-off-by: Julien Danjou --- client.c | 16 ++++++---------- structs.h | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/client.c b/client.c index dc1706ee..c8387ce3 100644 --- a/client.c +++ b/client.c @@ -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. diff --git a/structs.h b/structs.h index 8337fc30..da63d9f1 100644 --- a/structs.h +++ b/structs.h @@ -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 */