all repos — openbox @ c293fd65caff1879a4d27fcc177966fda97ddfe5

openbox fork - make it a bit more like ryudo

xinerama support for maximizing windows
Dana Jansens danakj@orodu.net
commit

c293fd65caff1879a4d27fcc177966fda97ddfe5

parent

b7ab0001ce99e430ffe984ea9e6e1eb688ed1dad

1 files changed, 15 insertions(+), 2 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -1792,8 +1792,21 @@ // use client.rect so that clients can be restored even if shaded

blackbox_attrib.premax_h = client.rect.height() + frame.margin.top + frame.margin.bottom; - const Rect &screen_area = screen->availableArea(); - frame.changing = screen_area; +#ifdef XINERAMA + if (screen->isXineramaActive() && blackbox->doXineramaMaximizing()) { + // find the area to use + RectList availableAreas = screen->allAvailableAreas(); + RectList::iterator it, end = availableAreas.end(); + + for (it = availableAreas.begin(); it != end; ++it) + if (it->intersects(frame.rect)) break; + if (it == end) // the window isn't inside an area + it = availableAreas.begin(); // so just default to the first one + + frame.changing = *it; + } else +#endif + frame.changing = screen->availableArea(); switch(button) { case 1: