X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FSlit.cc;h=c15f66c4b361ce336e51bfafb3689ffa210e383e;hb=ce5313528ead2692adfdfb41cf5e65dafcc0bc64;hp=b95c840c2ed4587c26aba5b51d77f9c3c9329b38;hpb=df7120d5ff0942dcae5a20bed79052e7be9bc1d1;p=chaz%2Fopenbox diff --git a/src/Slit.cc b/src/Slit.cc index b95c840c..c15f66c4 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -133,6 +133,17 @@ void Slit::addClient(Window w) { client->rect.setSize(64, 64); } + Atom *proto; + int num_return = 0; + if (XGetWMProtocols(display, client->window, &proto, &num_return)) { + for (int i = 0; i < num_return; ++i) { + if (proto[i] == + blackbox->getXAtom()->getAtom(XAtom::blackbox_structure_messages)) { + screen->addNetizen(new Netizen(screen, client->window)); + } + } + } + XSetWindowBorderWidth(display, client->window, 0); XGrabServer(display); @@ -466,12 +477,17 @@ void Slit::updateStrut(void) { case TopCenter: case TopLeft: case TopRight: - strut.top = getExposedHeight() + border_width; + strut.top = frame.rect.top() + getExposedHeight() + border_width; break; case BottomCenter: case BottomLeft: case BottomRight: - strut.bottom = getExposedHeight() + border_width; + int pos; + if (do_auto_hide) + pos = frame.y_hidden; + else + pos = frame.rect.y(); + strut.bottom = (screen->getRect().bottom() - pos); break; case CenterLeft: strut.left = getExposedWidth() + border_width; @@ -506,7 +522,7 @@ void Slit::reposition(void) { y = (screen->getHeight() - frame.rect.height()) / 2; else y = screen->getHeight() - frame.rect.height() - - (screen->getBorderWidth() * 2); + - (screen->getBorderWidth() * 2); break; @@ -519,7 +535,7 @@ void Slit::reposition(void) { y = 0; else y = screen->getHeight() - frame.rect.height() - - (screen->getBorderWidth() * 2); + - (screen->getBorderWidth() * 2); break; @@ -551,7 +567,7 @@ void Slit::reposition(void) { slit_rect.setSize(slit_rect.width() + (screen->getBorderWidth() * 2), slit_rect.height() + (screen->getBorderWidth() * 2)); - if (slit_rect.intersects(tbar_rect)) { + if (! screen->doHideToolbar() && slit_rect.intersects(tbar_rect)) { int delta = screen->getToolbar()->getExposedHeight() + screen->getBorderWidth(); if (frame.rect.bottom() <= tbar_rect.bottom())