Changeset View
Changeset View
Standalone View
Standalone View
composite.cpp
Show All 14 Lines | |||||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "composite.h" | 20 | #include "composite.h" | ||
21 | 21 | | |||
22 | #include "dbusinterface.h" | 22 | #include "dbusinterface.h" | ||
23 | #include "client.h" | 23 | #include "x11client.h" | ||
24 | #include "decorations/decoratedclient.h" | 24 | #include "decorations/decoratedclient.h" | ||
25 | #include "deleted.h" | 25 | #include "deleted.h" | ||
26 | #include "effects.h" | 26 | #include "effects.h" | ||
27 | #include "internal_client.h" | 27 | #include "internal_client.h" | ||
28 | #include "overlaywindow.h" | 28 | #include "overlaywindow.h" | ||
29 | #include "platform.h" | 29 | #include "platform.h" | ||
30 | #include "scene.h" | 30 | #include "scene.h" | ||
31 | #include "screens.h" | 31 | #include "screens.h" | ||
▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Line(s) | 341 | } else { | |||
343 | vBlankInterval = milliToNano(1); | 343 | vBlankInterval = milliToNano(1); | ||
344 | } | 344 | } | ||
345 | 345 | | |||
346 | // Sets also the 'effects' pointer. | 346 | // Sets also the 'effects' pointer. | ||
347 | kwinApp()->platform()->createEffectsHandler(this, m_scene); | 347 | kwinApp()->platform()->createEffectsHandler(this, m_scene); | ||
348 | connect(Workspace::self(), &Workspace::deletedRemoved, m_scene, &Scene::removeToplevel); | 348 | connect(Workspace::self(), &Workspace::deletedRemoved, m_scene, &Scene::removeToplevel); | ||
349 | connect(effects, &EffectsHandler::screenGeometryChanged, this, &Compositor::addRepaintFull); | 349 | connect(effects, &EffectsHandler::screenGeometryChanged, this, &Compositor::addRepaintFull); | ||
350 | 350 | | |||
351 | for (Client *c : Workspace::self()->clientList()) { | 351 | for (X11Client *c : Workspace::self()->clientList()) { | ||
352 | c->setupCompositing(); | 352 | c->setupCompositing(); | ||
353 | c->getShadow(); | 353 | c->getShadow(); | ||
354 | } | 354 | } | ||
355 | for (Client *c : Workspace::self()->desktopList()) { | 355 | for (X11Client *c : Workspace::self()->desktopList()) { | ||
356 | c->setupCompositing(); | 356 | c->setupCompositing(); | ||
357 | } | 357 | } | ||
358 | for (Unmanaged *c : Workspace::self()->unmanagedList()) { | 358 | for (Unmanaged *c : Workspace::self()->unmanagedList()) { | ||
359 | c->setupCompositing(); | 359 | c->setupCompositing(); | ||
360 | c->getShadow(); | 360 | c->getShadow(); | ||
361 | } | 361 | } | ||
362 | for (InternalClient *client : workspace()->internalClients()) { | 362 | for (InternalClient *client : workspace()->internalClients()) { | ||
363 | client->setupCompositing(); | 363 | client->setupCompositing(); | ||
Show All 38 Lines | 394 | { | |||
402 | 402 | | |||
403 | // Some effects might need access to effect windows when they are about to | 403 | // Some effects might need access to effect windows when they are about to | ||
404 | // be destroyed, for example to unreference deleted windows, so we have to | 404 | // be destroyed, for example to unreference deleted windows, so we have to | ||
405 | // make sure that effect windows outlive effects. | 405 | // make sure that effect windows outlive effects. | ||
406 | delete effects; | 406 | delete effects; | ||
407 | effects = nullptr; | 407 | effects = nullptr; | ||
408 | 408 | | |||
409 | if (Workspace::self()) { | 409 | if (Workspace::self()) { | ||
410 | for (Client *c : Workspace::self()->clientList()) { | 410 | for (X11Client *c : Workspace::self()->clientList()) { | ||
411 | m_scene->removeToplevel(c); | 411 | m_scene->removeToplevel(c); | ||
412 | } | 412 | } | ||
413 | for (Client *c : Workspace::self()->desktopList()) { | 413 | for (X11Client *c : Workspace::self()->desktopList()) { | ||
414 | m_scene->removeToplevel(c); | 414 | m_scene->removeToplevel(c); | ||
415 | } | 415 | } | ||
416 | for (Unmanaged *c : Workspace::self()->unmanagedList()) { | 416 | for (Unmanaged *c : Workspace::self()->unmanagedList()) { | ||
417 | m_scene->removeToplevel(c); | 417 | m_scene->removeToplevel(c); | ||
418 | } | 418 | } | ||
419 | for (InternalClient *client : workspace()->internalClients()) { | 419 | for (InternalClient *client : workspace()->internalClients()) { | ||
420 | m_scene->removeToplevel(client); | 420 | m_scene->removeToplevel(client); | ||
421 | } | 421 | } | ||
422 | for (Client *c : Workspace::self()->clientList()) { | 422 | for (X11Client *c : Workspace::self()->clientList()) { | ||
423 | c->finishCompositing(); | 423 | c->finishCompositing(); | ||
424 | } | 424 | } | ||
425 | for (Client *c : Workspace::self()->desktopList()) { | 425 | for (X11Client *c : Workspace::self()->desktopList()) { | ||
426 | c->finishCompositing(); | 426 | c->finishCompositing(); | ||
427 | } | 427 | } | ||
428 | for (Unmanaged *c : Workspace::self()->unmanagedList()) { | 428 | for (Unmanaged *c : Workspace::self()->unmanagedList()) { | ||
429 | c->finishCompositing(); | 429 | c->finishCompositing(); | ||
430 | } | 430 | } | ||
431 | for (InternalClient *client : workspace()->internalClients()) { | 431 | for (InternalClient *client : workspace()->internalClients()) { | ||
432 | client->finishCompositing(); | 432 | client->finishCompositing(); | ||
433 | } | 433 | } | ||
▲ Show 20 Lines • Show All 570 Lines • ▼ Show 20 Line(s) | 997 | { | |||
1004 | return scene()->overlayWindow()->isVisible(); | 1004 | return scene()->overlayWindow()->isVisible(); | ||
1005 | } | 1005 | } | ||
1006 | 1006 | | |||
1007 | int X11Compositor::refreshRate() const | 1007 | int X11Compositor::refreshRate() const | ||
1008 | { | 1008 | { | ||
1009 | return m_xrrRefreshRate; | 1009 | return m_xrrRefreshRate; | ||
1010 | } | 1010 | } | ||
1011 | 1011 | | |||
1012 | void X11Compositor::updateClientCompositeBlocking(Client *c) | 1012 | void X11Compositor::updateClientCompositeBlocking(X11Client *c) | ||
1013 | { | 1013 | { | ||
1014 | if (c) { | 1014 | if (c) { | ||
1015 | if (c->isBlockingCompositing()) { | 1015 | if (c->isBlockingCompositing()) { | ||
1016 | // Do NOT attempt to call suspend(true) from within the eventchain! | 1016 | // Do NOT attempt to call suspend(true) from within the eventchain! | ||
1017 | if (!(m_suspended & BlockRuleSuspend)) | 1017 | if (!(m_suspended & BlockRuleSuspend)) | ||
1018 | QMetaObject::invokeMethod(this, "suspend", Qt::QueuedConnection, | 1018 | QMetaObject::invokeMethod(this, "suspend", Qt::QueuedConnection, | ||
1019 | Q_ARG(SuspendReason, BlockRuleSuspend)); | 1019 | Q_ARG(SuspendReason, BlockRuleSuspend)); | ||
1020 | } | 1020 | } | ||
Show All 29 Lines |