[titlebar] Fix unmap/map handling
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
029a60072b
commit
3df5a50fc4
13
titlebar.c
13
titlebar.c
|
@ -71,6 +71,7 @@ titlebar_init(Client *c)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
XMapWindow(globalconf.display, c->titlebar.sw->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add the titlebar geometry to a geometry.
|
/** Add the titlebar geometry to a geometry.
|
||||||
|
@ -231,7 +232,6 @@ titlebar_update_geometry_floating(Client *c)
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
case Off:
|
case Off:
|
||||||
XUnmapWindow(globalconf.display, c->titlebar.sw->window);
|
|
||||||
return;
|
return;
|
||||||
case Top:
|
case Top:
|
||||||
if(!c->titlebar.width)
|
if(!c->titlebar.width)
|
||||||
|
@ -323,7 +323,6 @@ titlebar_update_geometry_floating(Client *c)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMapWindow(globalconf.display, c->titlebar.sw->window);
|
|
||||||
titlebar_draw(c);
|
titlebar_draw(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +344,6 @@ titlebar_update_geometry(Client *c, area_t geometry)
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
case Off:
|
case Off:
|
||||||
XUnmapWindow(globalconf.display, c->titlebar.sw->window);
|
|
||||||
return;
|
return;
|
||||||
case Top:
|
case Top:
|
||||||
if(!c->titlebar.width)
|
if(!c->titlebar.width)
|
||||||
|
@ -439,7 +437,6 @@ titlebar_update_geometry(Client *c, area_t geometry)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMapWindow(globalconf.display, c->titlebar.sw->window);
|
|
||||||
titlebar_draw(c);
|
titlebar_draw(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,9 +454,15 @@ uicb_client_toggletitlebar(int screen __attribute__ ((unused)), char *arg __attr
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!c->titlebar.position)
|
if(!c->titlebar.position)
|
||||||
c->titlebar.position = c->titlebar.dposition;
|
{
|
||||||
|
if((c->titlebar.position = c->titlebar.dposition))
|
||||||
|
XMapWindow(globalconf.display, c->titlebar.sw->window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
c->titlebar.position = Off;
|
c->titlebar.position = Off;
|
||||||
|
XUnmapWindow(globalconf.display, c->titlebar.sw->window);
|
||||||
|
}
|
||||||
|
|
||||||
if(c->isfloating || layout_get_current(screen)->arrange == layout_floating)
|
if(c->isfloating || layout_get_current(screen)->arrange == layout_floating)
|
||||||
titlebar_update_geometry_floating(c);
|
titlebar_update_geometry_floating(c);
|
||||||
|
|
Loading…
Reference in New Issue