Changeset View
Changeset View
Standalone View
Standalone View
src/windowsystem/windowsystem.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 59 | { | |||
---|---|---|---|---|---|
63 | } | 63 | } | ||
64 | } | 64 | } | ||
65 | 65 | | |||
66 | void WindowSystem::forceActiveWindow(WId win, long int time) | 66 | void WindowSystem::forceActiveWindow(WId win, long int time) | ||
67 | { | 67 | { | ||
68 | Q_UNUSED(time) | 68 | Q_UNUSED(time) | ||
69 | if (PlasmaWindow *w = window(win)) { | 69 | if (PlasmaWindow *w = window(win)) { | ||
70 | w->requestActivate(); | 70 | w->requestActivate(); | ||
71 | } else { | ||||
72 | Surface *s = Surface::fromQtWinId(win); | ||||
73 | if (!s) { | ||||
74 | return; | ||||
75 | } | ||||
76 | auto plasmaShellSurface = PlasmaShellSurface::get(s); | ||||
77 | if (!plasmaShellSurface) { | ||||
78 | return; | ||||
79 | } | ||||
80 | if (plasmaShellSurface->role() == PlasmaShellSurface::Role::Panel) { | ||||
81 | plasmaShellSurface->setPanelTakesFocus(true); | ||||
82 | } | ||||
71 | } | 83 | } | ||
72 | } | 84 | } | ||
73 | 85 | | |||
74 | WId WindowSystem::activeWindow() | 86 | WId WindowSystem::activeWindow() | ||
75 | { | 87 | { | ||
76 | KWayland::Client::PlasmaWindowManagement *wm = WaylandIntegration::self()->plasmaWindowManagement(); | 88 | KWayland::Client::PlasmaWindowManagement *wm = WaylandIntegration::self()->plasmaWindowManagement(); | ||
77 | if (wm && wm->activeWindow()) { | 89 | if (wm && wm->activeWindow()) { | ||
78 | return wm->activeWindow()->internalId(); | 90 | return wm->activeWindow()->internalId(); | ||
▲ Show 20 Lines • Show All 446 Lines • Show Last 20 Lines |