[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.
remotes/origin/Plasma/5.0
Martin Gräßlin 13 years ago
parent 0056302652
commit b6f9bd988b
  1. 3
      events.cpp

@ -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)) {

Loading…
Cancel
Save