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