|
|
c54cd9 |
From f915e53eaa596654ee1b9726a4767a1cba11336f Mon Sep 17 00:00:00 2001
|
|
|
c54cd9 |
From: Aleix Pol <aleixpol@kde.org>
|
|
|
c54cd9 |
Date: Mon, 23 Nov 2020 20:07:02 +0100
|
|
|
c54cd9 |
Subject: [PATCH] xdgshell: Tell the compositor the screen we're expecting to
|
|
|
c54cd9 |
fill
|
|
|
c54cd9 |
|
|
|
c54cd9 |
The xdgshell protocol allows us to tell the output to fill. This makes
|
|
|
c54cd9 |
it possible to use fullscreen confidently on systems with multiple
|
|
|
c54cd9 |
screens knowing that our windows won't be overlapping one another by
|
|
|
c54cd9 |
calling setScreen accordingly before QWindow::showFullScreen.
|
|
|
c54cd9 |
|
|
|
c54cd9 |
Pick-to: 6.1 6.0 5.15
|
|
|
c54cd9 |
Change-Id: I757854c3698639472f3a25ef298ddcca031e1ed5
|
|
|
c54cd9 |
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
c54cd9 |
---
|
|
|
c54cd9 |
.../shellintegration/xdg-shell/qwaylandxdgshell.cpp | 9 ++++++---
|
|
|
c54cd9 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
c54cd9 |
|
|
|
c54cd9 |
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
|
|
|
c54cd9 |
index b7253de2b..af8bd9264 100644
|
|
|
c54cd9 |
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
|
|
|
c54cd9 |
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
|
|
|
c54cd9 |
@@ -178,9 +178,12 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states)
|
|
|
c54cd9 |
}
|
|
|
c54cd9 |
|
|
|
c54cd9 |
if (changedStates & Qt::WindowFullScreen) {
|
|
|
c54cd9 |
- if (states & Qt::WindowFullScreen)
|
|
|
c54cd9 |
- set_fullscreen(nullptr);
|
|
|
c54cd9 |
- else
|
|
|
c54cd9 |
+ if (states & Qt::WindowFullScreen) {
|
|
|
c54cd9 |
+ auto screen = m_xdgSurface->window()->waylandScreen();
|
|
|
c54cd9 |
+ if (screen) {
|
|
|
c54cd9 |
+ set_fullscreen(screen->output());
|
|
|
c54cd9 |
+ }
|
|
|
c54cd9 |
+ } else
|
|
|
c54cd9 |
unset_fullscreen();
|
|
|
c54cd9 |
}
|
|
|
c54cd9 |
|