Do not accept left mouse press events on titlebar in Aurorae

Accepting the mouse events breaks moving the window by dragging
the title bar. The reason is that it eats the mouse event and
by that never reaches KWin core to perform the movement.

Other mouse buttons need to be accepted for handling the window
operations. Also we need to listen in general to left mouse
button for the double click operation.

BUG: 304249
FIXED-IN: 4.9.1
REVIEW: 105784
icc-effect-5.14.5
Martin Gräßlin 2012-07-29 22:03:11 +02:00
parent 5c7d046d13
commit 46441998a3
1 changed files with 7 additions and 1 deletions

View File

@ -155,7 +155,13 @@ Decoration {
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
anchors.fill: parent
onDoubleClicked: decoration.titlebarDblClickOperation()
onPressed: decoration.titlePressed(mouse.button, mouse.buttons)
onPressed: {
if (mouse.button == Qt.LeftButton) {
mouse.accepted = false;
} else {
decoration.titlePressed(mouse.button, mouse.buttons);
}
}
onReleased: decoration.titleReleased(mouse.button, mouse.buttons)
}
Behavior on color {