X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FToolbar.cc;h=6e54b0185415cab69508633849b671503576be4b;hb=73f0a9099304929c48cdbe0c686097b86a2db8e9;hp=12f778eba542523c8ebc4304e9e0bced9553ab9a;hpb=18499a6920309d6ddfe70767f8a90e2778a96ba7;p=chaz%2Fopenbox diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 12f778eb..6e54b018 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -154,14 +154,13 @@ Toolbar::Toolbar(BScreen &scrn, Resource &conf) : screen(scrn), mapToolbar(); } -int Toolbar::getX() const { - return ((m_hidden) ? frame.x_hidden : frame.x); -} - -int Toolbar::getY() const { - if (screen.hideToolbar()) return screen.size().h(); - else if (m_hidden) return frame.y_hidden; - else return frame.y; +Rect Toolbar::area() const { + int x = ((m_hidden) ? frame.x_hidden : frame.x); + int y; + if (screen.hideToolbar()) y = screen.size().h(); + else if (m_hidden) y = frame.y_hidden; + else y = frame.y; + return Rect(x, y, frame.width, frame.height); } unsigned int Toolbar::getExposedHeight() const { @@ -398,7 +397,7 @@ void Toolbar::reconfigure() { if (tt) { char t[1025], *time_string = (char *) 0; int len = strftime(t, 1024, screen.strftimeFormat(), tt); - t[len++-1] = ' '; // add a space to the string for padding + t[len++] = ' '; // add a space to the string for padding t[len] = '\0'; if (i18n->multibyte()) {