Changeset View
Changeset View
Standalone View
Standalone View
greeter/greeterapp.cpp
Show All 36 Lines | |||||
37 | #include <KPackage/PackageLoader> | 37 | #include <KPackage/PackageLoader> | ||
38 | // KWayland | 38 | // KWayland | ||
39 | #include <KWayland/Client/connection_thread.h> | 39 | #include <KWayland/Client/connection_thread.h> | ||
40 | #include <KWayland/Client/event_queue.h> | 40 | #include <KWayland/Client/event_queue.h> | ||
41 | #include <KWayland/Client/plasmashell.h> | 41 | #include <KWayland/Client/plasmashell.h> | ||
42 | #include <KWayland/Client/registry.h> | 42 | #include <KWayland/Client/registry.h> | ||
43 | #include <KWayland/Client/surface.h> | 43 | #include <KWayland/Client/surface.h> | ||
44 | // Qt | 44 | // Qt | ||
45 | #include <QClipboard> | ||||
45 | #include <QAbstractNativeEventFilter> | 46 | #include <QAbstractNativeEventFilter> | ||
46 | #include <QtCore/QTimer> | 47 | #include <QtCore/QTimer> | ||
47 | #include <QtGui/QKeyEvent> | 48 | #include <QtGui/QKeyEvent> | ||
48 | #include <qscreen.h> | 49 | #include <qscreen.h> | ||
49 | #include <QThread> | 50 | #include <QThread> | ||
50 | 51 | | |||
51 | #include <QQuickView> | 52 | #include <QQuickView> | ||
52 | #include <QQuickItem> | 53 | #include <QQuickItem> | ||
▲ Show 20 Lines • Show All 303 Lines • ▼ Show 20 Line(s) | |||||
356 | 357 | | |||
357 | void UnlockApp::markViewsAsVisible(KQuickAddons::QuickViewSharedEngine *view) | 358 | void UnlockApp::markViewsAsVisible(KQuickAddons::QuickViewSharedEngine *view) | ||
358 | { | 359 | { | ||
359 | disconnect(view, &QQuickWindow::frameSwapped, this, 0); | 360 | disconnect(view, &QQuickWindow::frameSwapped, this, 0); | ||
360 | QQmlProperty showProperty(view->rootObject(), QStringLiteral("viewVisible")); | 361 | QQmlProperty showProperty(view->rootObject(), QStringLiteral("viewVisible")); | ||
361 | showProperty.write(true); | 362 | showProperty.write(true); | ||
362 | // random state update, actually rather required on init only | 363 | // random state update, actually rather required on init only | ||
363 | QMetaObject::invokeMethod(this, "getFocus", Qt::QueuedConnection); | 364 | QMetaObject::invokeMethod(this, "getFocus", Qt::QueuedConnection); | ||
365 | QGuiApplication::clipboard()->clear(); | ||||
364 | } | 366 | } | ||
365 | 367 | | |||
366 | void UnlockApp::getFocus() | 368 | void UnlockApp::getFocus() | ||
367 | { | 369 | { | ||
368 | if (m_views.isEmpty()) { | 370 | if (m_views.isEmpty()) { | ||
369 | return; | 371 | return; | ||
370 | } | 372 | } | ||
371 | QWindow *w = 0; | 373 | QWindow *w = 0; | ||
▲ Show 20 Lines • Show All 332 Lines • Show Last 20 Lines |