snapping better to the xinerama regions
This commit is contained in:
parent
a0f9b93d5b
commit
1e19ccc2cb
1 changed files with 16 additions and 8 deletions
|
@ -1810,7 +1810,7 @@ void BlackboxWindow::maximize(unsigned int button) {
|
||||||
|
|
||||||
frame.changing = *it;
|
frame.changing = *it;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif // XINERAMA
|
||||||
frame.changing = screen->availableArea();
|
frame.changing = screen->availableArea();
|
||||||
|
|
||||||
switch(button) {
|
switch(button) {
|
||||||
|
@ -3044,17 +3044,25 @@ void BlackboxWindow::doMove(int x_root, int y_root) {
|
||||||
|
|
||||||
// snap to the strut (and screen boundaries for xinerama)
|
// snap to the strut (and screen boundaries for xinerama)
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
if (screen->isXineramaActive() && blackbox->doXineramaSnapping())
|
if (screen->isXineramaActive() && blackbox->doXineramaSnapping()) {
|
||||||
|
if (! screen->doFullMax())
|
||||||
|
snaplist.insert(snaplist.begin(),
|
||||||
|
screen->allAvailableAreas().begin(),
|
||||||
|
screen->allAvailableAreas().end());
|
||||||
|
|
||||||
|
// always snap to the screen edges
|
||||||
snaplist.insert(snaplist.begin(),
|
snaplist.insert(snaplist.begin(),
|
||||||
screen->allAvailableAreas().begin(),
|
screen->getXineramaAreas().begin(),
|
||||||
screen->allAvailableAreas().end());
|
screen->getXineramaAreas().end());
|
||||||
else
|
} else
|
||||||
#endif // XINERAMA
|
#endif // XINERAMA
|
||||||
|
{
|
||||||
if (! screen->doFullMax())
|
if (! screen->doFullMax())
|
||||||
snaplist.push_back(screen->availableArea());
|
snaplist.push_back(screen->availableArea());
|
||||||
|
|
||||||
// always snap to the screen edges
|
// always snap to the screen edges
|
||||||
snaplist.push_back(screen->getRect());
|
snaplist.push_back(screen->getRect());
|
||||||
|
}
|
||||||
|
|
||||||
RectList::const_iterator it, end = snaplist.end();
|
RectList::const_iterator it, end = snaplist.end();
|
||||||
for (it = snaplist.begin(); it != end; ++it) {
|
for (it = snaplist.begin(); it != end; ++it) {
|
||||||
|
|
Loading…
Reference in a new issue