Changeset View
Changeset View
Standalone View
Standalone View
ksmserver/switchuser-greeter/main.cpp
Show All 19 Lines | |||||
20 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | 20 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | ||
21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
23 | 23 | | |||
24 | ******************************************************************/ | 24 | ******************************************************************/ | ||
25 | 25 | | |||
26 | #include <QGuiApplication> | 26 | #include <QGuiApplication> | ||
27 | #include <QScreen> | 27 | #include <QScreen> | ||
28 | #include <QLibraryInfo> | ||||
28 | 29 | | |||
29 | #include "../switchuserdialog.h" | 30 | #include "../switchuserdialog.h" | ||
30 | 31 | | |||
31 | #include <kdisplaymanager.h> | 32 | #include <kdisplaymanager.h> | ||
32 | #include <KWindowSystem> | 33 | #include <KWindowSystem> | ||
33 | 34 | | |||
34 | #include <KWayland/Client/connection_thread.h> | 35 | #include <KWayland/Client/connection_thread.h> | ||
35 | #include <KWayland/Client/registry.h> | 36 | #include <KWayland/Client/registry.h> | ||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 122 | if (event->type() == QEvent::MouseButtonPress) { | |||
130 | qApp->quit(); | 131 | qApp->quit(); | ||
131 | } | 132 | } | ||
132 | } | 133 | } | ||
133 | return false; | 134 | return false; | ||
134 | } | 135 | } | ||
135 | 136 | | |||
136 | int main(int argc, char *argv[]) | 137 | int main(int argc, char *argv[]) | ||
137 | { | 138 | { | ||
138 | // Qt does not currently (5.9.4) support fullscreen on xdg_shell v6. | 139 | if (QLibraryInfo::version() < QVersionNumber(5, 12)) { | ||
140 | // Before Qt 5.12, the xdg-shell v6 integration does not support fullscreen. | ||||
139 | qputenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell"); | 141 | qputenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell"); | ||
142 | } | ||||
140 | 143 | | |||
141 | QQuickWindow::setDefaultAlphaBuffer(true); | 144 | QQuickWindow::setDefaultAlphaBuffer(true); | ||
142 | QGuiApplication app(argc, argv); | 145 | QGuiApplication app(argc, argv); | ||
143 | 146 | | |||
144 | Greeter greeter; | 147 | Greeter greeter; | ||
145 | greeter.init(); | 148 | greeter.init(); | ||
146 | 149 | | |||
147 | return app.exec(); | 150 | return app.exec(); | ||
148 | } | 151 | } | ||
149 | 152 | | |||
150 | #include "main.moc" | 153 | #include "main.moc" |