Fix incorrect mouse position calculation in Aurorae
svn path=/trunk/KDE/kdebase/workspace/; revision=1118270
This commit is contained in:
parent
352ccf4018
commit
6fe0694930
2 changed files with 3 additions and 5 deletions
|
@ -256,7 +256,7 @@ KDecorationDefines::Position AuroraeClient::mousePosition(const QPoint &point) c
|
|||
borders(borderLeft, borderRight, borderTop, borderBottom);
|
||||
int paddingLeft, paddingTop, paddingRight, paddingBottom;
|
||||
padding(paddingLeft, paddingRight, paddingTop, paddingBottom);
|
||||
if (point.x() >= (width() - borderRight)) {
|
||||
if (point.x() >= (m_view->width() - borderRight - paddingRight)) {
|
||||
pos |= PositionRight;
|
||||
} else if (point.x() <= borderLeft + paddingLeft) {
|
||||
pos |= PositionLeft;
|
||||
|
@ -265,7 +265,7 @@ KDecorationDefines::Position AuroraeClient::mousePosition(const QPoint &point) c
|
|||
const bool maximized = maximizeMode() == MaximizeFull && !options()->moveResizeMaximizedWindows();
|
||||
int titleEdgeLeft, titleEdgeRight, titleEdgeTop, titleEdgeBottom;
|
||||
AuroraeFactory::instance()->theme()->titleEdges(titleEdgeLeft, titleEdgeTop, titleEdgeRight, titleEdgeBottom, maximized);
|
||||
if (point.y() >= height() - borderBottom) {
|
||||
if (point.y() >= m_view->height() - borderBottom - paddingBottom) {
|
||||
pos |= PositionBottom;
|
||||
} else if (point.y() <= titleEdgeTop + paddingTop ) {
|
||||
pos |= PositionTop;
|
||||
|
|
|
@ -637,9 +637,7 @@ void AuroraeScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
|
|||
void AuroraeScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
|
||||
{
|
||||
QGraphicsScene::mouseMoveEvent(event);
|
||||
if (!event->isAccepted()) {
|
||||
emit titleMouseMoved(event->button(), event->buttons());
|
||||
}
|
||||
emit titleMouseMoved(event->button(), event->buttons());
|
||||
}
|
||||
|
||||
void AuroraeScene::wheelEvent(QGraphicsSceneWheelEvent* event)
|
||||
|
|
Loading…
Reference in a new issue