[kwin] Do not filter out button release events for moving clients

The QWidget of the window decoration is otherwise still thinking that
the button is pressed and waits for a release. Thus the next click on
the decoration doesn't trigger the move mode.
This commit is contained in:
Martin Gräßlin 2013-11-13 14:40:57 +01:00
parent 0056302652
commit b6f9bd988b

View file

@ -260,7 +260,8 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
if (movingClient) {
if (eventType == XCB_BUTTON_PRESS || eventType == XCB_BUTTON_RELEASE) {
if (movingClient->moveResizeGrabWindow() == reinterpret_cast<xcb_button_press_event_t*>(e)->event && movingClient->windowEvent(e)) {
return true;
// we need to pass the button release event to the decoration, otherwise Qt still thinks the button is pressed.
return eventType == XCB_BUTTON_PRESS;
}
} else if (eventType == XCB_MOTION_NOTIFY) {
if (movingClient->moveResizeGrabWindow() == reinterpret_cast<xcb_motion_notify_event_t*>(e)->event && movingClient->windowEvent(e)) {