summaryrefslogtreecommitdiffstats
path: root/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp')
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
index 88a63655c..4506c312a 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
@@ -76,11 +76,10 @@ QWaylandWlShellSurface::~QWaylandWlShellSurface()
delete m_extendedWindow;
}
-void QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges)
+void QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
- resize(inputDevice->wl_seat(),
- inputDevice->serial(),
- edges);
+ enum resize resizeEdges = convertToResizeEdges(edges);
+ resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
}
bool QWaylandWlShellSurface::move(QWaylandInputDevice *inputDevice)
@@ -193,6 +192,14 @@ void QWaylandWlShellSurface::requestWindowStates(Qt::WindowStates states)
m_pending.states = states & ~Qt::WindowMinimized;
}
+enum QWaylandWlShellSurface::resize QWaylandWlShellSurface::convertToResizeEdges(Qt::Edges edges)
+{
+ return static_cast<enum resize>(
+ ((edges & Qt::TopEdge) ? resize_top : 0)
+ | ((edges & Qt::BottomEdge) ? resize_bottom : 0)
+ | ((edges & Qt::LeftEdge) ? resize_left : 0)
+ | ((edges & Qt::RightEdge) ? resize_right : 0));
+}
void QWaylandWlShellSurface::setTopLevel()
{