Changeset View
Changeset View
Standalone View
Standalone View
src/server/plasmawindowmanagement_interface.cpp
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Line(s) | |||||
164 | { | 164 | { | ||
165 | auto p = reinterpret_cast<Private*>(wl_resource_get_user_data(resource)); | 165 | auto p = reinterpret_cast<Private*>(wl_resource_get_user_data(resource)); | ||
166 | auto it = std::find_if(p->windows.constBegin(), p->windows.constEnd(), | 166 | auto it = std::find_if(p->windows.constBegin(), p->windows.constEnd(), | ||
167 | [internalWindowId] (PlasmaWindowInterface *window) { | 167 | [internalWindowId] (PlasmaWindowInterface *window) { | ||
168 | return window->d->windowId == internalWindowId; | 168 | return window->d->windowId == internalWindowId; | ||
169 | } | 169 | } | ||
170 | ); | 170 | ); | ||
171 | if (it == p->windows.constEnd()) { | 171 | if (it == p->windows.constEnd()) { | ||
172 | ClientConnection *c = p->q->display()->getConnection(client); | 172 | // create a temp window just for the resource and directly send an unmapped | ||
173 | wl_resource *r = c->createResource(&org_kde_plasma_window_interface, wl_resource_get_version(resource), id); | 173 | PlasmaWindowInterface *window = new PlasmaWindowInterface(p->q, p->q); | ||
174 | if (!r) { | 174 | window->d->createResource(resource, id); | ||
175 | return; | 175 | window->unmap(); | ||
176 | } | | |||
177 | org_kde_plasma_window_send_unmapped(r); | | |||
178 | wl_resource_destroy(r); | | |||
179 | return; | 176 | return; | ||
180 | } | 177 | } | ||
181 | (*it)->d->createResource(resource, id); | 178 | (*it)->d->createResource(resource, id); | ||
182 | } | 179 | } | ||
183 | 180 | | |||
184 | PlasmaWindowManagementInterface::PlasmaWindowManagementInterface(Display *display, QObject *parent) | 181 | PlasmaWindowManagementInterface::PlasmaWindowManagementInterface(Display *display, QObject *parent) | ||
185 | : Global(new Private(this, display), parent) | 182 | : Global(new Private(this, display), parent) | ||
186 | { | 183 | { | ||
▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines |