Off-by-one fix for resizebar.
Hide resizebar when window is fixed size. svn path=/trunk/kdebase/kwin/; revision=91783
This commit is contained in:
parent
2cac00359f
commit
352086d08b
1 changed files with 39 additions and 22 deletions
|
@ -128,7 +128,10 @@ Manager::Manager(
|
||||||
midLayout->addWidget(windowWrapper());
|
midLayout->addWidget(windowWrapper());
|
||||||
midLayout->addSpacing(1);
|
midLayout->addSpacing(1);
|
||||||
|
|
||||||
|
if (isResizable())
|
||||||
l->addSpacing(Static::instance()->resizeHeight());
|
l->addSpacing(Static::instance()->resizeHeight());
|
||||||
|
else
|
||||||
|
l->addSpacing(1);
|
||||||
|
|
||||||
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
||||||
}
|
}
|
||||||
|
@ -172,6 +175,8 @@ Manager::paintEvent(QPaintEvent * e)
|
||||||
|
|
||||||
// Resize bar.
|
// Resize bar.
|
||||||
|
|
||||||
|
if (isResizable())
|
||||||
|
{
|
||||||
int rbt = height() - Static::instance()->resizeHeight(); // Resize bar top.
|
int rbt = height() - Static::instance()->resizeHeight(); // Resize bar top.
|
||||||
|
|
||||||
bitBlt(this, 0, rbt, &(s->resize(active)));
|
bitBlt(this, 0, rbt, &(s->resize(active)));
|
||||||
|
@ -187,6 +192,11 @@ Manager::paintEvent(QPaintEvent * e)
|
||||||
|
|
||||||
bitBlt(this, width() - 32, rbt, &(s->resizeMidRight(active)));
|
bitBlt(this, width() - 32, rbt, &(s->resizeMidRight(active)));
|
||||||
bitBlt(this, width() - 30, rbt, &(s->resize(active)));
|
bitBlt(this, width() - 30, rbt, &(s->resize(active)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p.drawLine(1, height() - 1, width() - 2, height() - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -292,13 +302,19 @@ Manager::updateTitleBuffer()
|
||||||
p.drawPixmap(tr.width() - 3, 0, s->titleTextRight(active));
|
p.drawPixmap(tr.width() - 3, 0, s->titleTextRight(active));
|
||||||
}
|
}
|
||||||
|
|
||||||
KWinInternal::Client::MousePosition
|
KWinInternal::Client::MousePosition
|
||||||
Manager::mousePosition(const QPoint & p) const
|
Manager::mousePosition(const QPoint & p) const
|
||||||
{
|
{
|
||||||
MousePosition m = Center;
|
MousePosition m = Center;
|
||||||
|
|
||||||
if (p.y() > (height() - Static::instance()->resizeHeight())) {
|
// Off-by-one here ?
|
||||||
|
|
||||||
|
if (isResizable())
|
||||||
|
{
|
||||||
|
if (p.y() > (height() - (Static::instance()->resizeHeight() + 1)))
|
||||||
|
{
|
||||||
// Keep order !
|
// Keep order !
|
||||||
|
|
||||||
if (p.x() >= (width() - 30))
|
if (p.x() >= (width() - 30))
|
||||||
m = BottomRight;
|
m = BottomRight;
|
||||||
else if (p.x() <= 30)
|
else if (p.x() <= 30)
|
||||||
|
@ -306,6 +322,7 @@ Manager::mousePosition(const QPoint & p) const
|
||||||
else
|
else
|
||||||
m = Bottom;
|
m = Bottom;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue