xinerama support for maximizing windows

This commit is contained in:
Dana Jansens 2002-07-22 04:56:25 +00:00
parent b7ab0001ce
commit c293fd65ca

View file

@ -1792,8 +1792,21 @@ void BlackboxWindow::maximize(unsigned int button) {
blackbox_attrib.premax_h = blackbox_attrib.premax_h =
client.rect.height() + frame.margin.top + frame.margin.bottom; client.rect.height() + frame.margin.top + frame.margin.bottom;
const Rect &screen_area = screen->availableArea(); #ifdef XINERAMA
frame.changing = screen_area; 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) { switch(button) {
case 1: case 1: