Commit a2962635 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

XdgSurfaceClient: set to current activity and desktop in constructors

BUG: 435745
FIXED-IN: 5.22.2


(cherry picked from commit 0f6495f4)
parent 5a9959c7
......@@ -18,6 +18,9 @@
#include "subsurfacemonitor.h"
#include "wayland_server.h"
#include "workspace.h"
#if KWIN_BUILD_ACTIVITIES
#include "activities.h"
#endif
#include <KDecoration2/DecoratedClient>
#include <KDecoration2/Decoration>
......@@ -375,6 +378,11 @@ XdgToplevelClient::XdgToplevelClient(XdgToplevelInterface *shellSurface)
setupWindowManagementIntegration();
setupPlasmaShellIntegration();
setDesktop(VirtualDesktopManager::self()->current());
#if KWIN_BUILD_ACTIVITIES
if (auto a = Activities::self()) {
setOnActivities({a->current()});
}
#endif
if (waylandServer()->inputMethodConnection() == surface()->client()) {
m_windowType = NET::OnScreenDisplay;
......@@ -1380,6 +1388,9 @@ void XdgToplevelClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *s
case NET::CriticalNotification:
case NET::Tooltip:
setOnAllDesktops(true);
#if KWIN_BUILD_ACTIVITIES
setOnAllActivities(true);
#endif
break;
default:
break;
......@@ -1739,6 +1750,11 @@ XdgPopupClient::XdgPopupClient(XdgPopupInterface *shellSurface)
, m_shellSurface(shellSurface)
{
setDesktop(VirtualDesktopManager::self()->current());
#if KWIN_BUILD_ACTIVITIES
if (auto a = Activities::self()) {
setOnActivities({a->current()});
}
#endif
connect(shellSurface, &XdgPopupInterface::grabRequested,
this, &XdgPopupClient::handleGrabRequested);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment