summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshellintegration.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-06-09 15:55:45 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-06-21 10:30:33 +0000
commitf8f20e62ae31f818a4277e47cbe212a75a933e10 (patch)
tree5bb0893735185c74af2814017d2bb3bb72f5bd43 /src/compositor/extensions/qwaylandxdgshellintegration.cpp
parent4a8137716a48bd881d2b109ea9ffe5bca95304fe (diff)
xdg_shell: Send unmaximize configure events with zero width and height
This is what Weston does. It also fixes an issue where clicking and releasing the window border without moving the mouse would result in an incorrect size being sent in the configure event (because resizeState is initialized in the move handler, which may not have been called). Change-Id: Ib2a544c39cf74a210ac8fafe3624d9169ea06b4c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshellintegration.cpp')
-rw-r--r--src/compositor/extensions/qwaylandxdgshellintegration.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellintegration.cpp b/src/compositor/extensions/qwaylandxdgshellintegration.cpp
index f77f69273..ab10011e6 100644
--- a/src/compositor/extensions/qwaylandxdgshellintegration.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellintegration.cpp
@@ -92,11 +92,10 @@ bool XdgShellIntegration::mouseMoveEvent(QMouseEvent *event)
bool XdgShellIntegration::mouseReleaseEvent(QMouseEvent *event)
{
+ Q_UNUSED(event);
+
if (grabberState == GrabberState::Resize) {
- float scaleFactor = m_item->view()->output()->scaleFactor();
- QPointF delta = (event->windowPos() - resizeState.initialMousePos) / scaleFactor;
- QSize newSize = m_xdgSurface->sizeForResize(resizeState.initialWindowSize, delta, resizeState.resizeEdges);
- m_xdgSurface->requestUnMaximized(newSize);
+ m_xdgSurface->requestUnMaximized();
grabberState = GrabberState::Default;
return true;
} else if (grabberState == GrabberState::Move) {