Changeset View
Changeset View
Standalone View
Standalone View
composite.cpp
Show All 24 Lines | |||||
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" | ||
32 | #include "shadow.h" | 32 | #include "shadow.h" | ||
33 | #include "shell_client.h" | 33 | #include "xdgshellclient.h" | ||
34 | #include "unmanaged.h" | 34 | #include "unmanaged.h" | ||
35 | #include "useractions.h" | 35 | #include "useractions.h" | ||
36 | #include "utils.h" | 36 | #include "utils.h" | ||
37 | #include "wayland_server.h" | 37 | #include "wayland_server.h" | ||
38 | #include "workspace.h" | 38 | #include "workspace.h" | ||
39 | #include "xcbutils.h" | 39 | #include "xcbutils.h" | ||
40 | 40 | | |||
41 | #include <kwingltexture.h> | 41 | #include <kwingltexture.h> | ||
▲ Show 20 Lines • Show All 323 Lines • ▼ Show 20 Line(s) | 326 | { | |||
365 | } | 365 | } | ||
366 | for (InternalClient *client : workspace()->internalClients()) { | 366 | for (InternalClient *client : workspace()->internalClients()) { | ||
367 | client->setupCompositing(); | 367 | client->setupCompositing(); | ||
368 | client->getShadow(); | 368 | client->getShadow(); | ||
369 | } | 369 | } | ||
370 | 370 | | |||
371 | if (auto *server = waylandServer()) { | 371 | if (auto *server = waylandServer()) { | ||
372 | const auto clients = server->clients(); | 372 | const auto clients = server->clients(); | ||
373 | for (ShellClient *c : clients) { | 373 | for (XdgShellClient *c : clients) { | ||
374 | c->setupCompositing(); | 374 | c->setupCompositing(); | ||
375 | c->getShadow(); | 375 | c->getShadow(); | ||
376 | } | 376 | } | ||
377 | } | 377 | } | ||
378 | 378 | | |||
379 | m_state = State::On; | 379 | m_state = State::On; | ||
380 | emit compositingToggled(true); | 380 | emit compositingToggled(true); | ||
381 | 381 | | |||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 438 | xcb_composite_unredirect_subwindows(con, kwinApp()->x11RootWindow(), | |||
439 | XCB_COMPOSITE_REDIRECT_MANUAL); | 439 | XCB_COMPOSITE_REDIRECT_MANUAL); | ||
440 | } | 440 | } | ||
441 | while (!workspace()->deletedList().isEmpty()) { | 441 | while (!workspace()->deletedList().isEmpty()) { | ||
442 | workspace()->deletedList().first()->discard(); | 442 | workspace()->deletedList().first()->discard(); | ||
443 | } | 443 | } | ||
444 | } | 444 | } | ||
445 | 445 | | |||
446 | if (waylandServer()) { | 446 | if (waylandServer()) { | ||
447 | for (ShellClient *c : waylandServer()->clients()) { | 447 | for (XdgShellClient *c : waylandServer()->clients()) { | ||
448 | m_scene->removeToplevel(c); | 448 | m_scene->removeToplevel(c); | ||
449 | } | 449 | } | ||
450 | for (ShellClient *c : waylandServer()->clients()) { | 450 | for (XdgShellClient *c : waylandServer()->clients()) { | ||
451 | c->finishCompositing(); | 451 | c->finishCompositing(); | ||
452 | } | 452 | } | ||
453 | } | 453 | } | ||
454 | 454 | | |||
455 | delete m_scene; | 455 | delete m_scene; | ||
456 | m_scene = NULL; | 456 | m_scene = NULL; | ||
457 | compositeTimer.stop(); | 457 | compositeTimer.stop(); | ||
458 | repaints_region = QRegion(); | 458 | repaints_region = QRegion(); | ||
▲ Show 20 Lines • Show All 287 Lines • ▼ Show 20 Line(s) | 739 | { | |||
746 | if (repaintsPending(Workspace::self()->unmanagedList())) { | 746 | if (repaintsPending(Workspace::self()->unmanagedList())) { | ||
747 | return true; | 747 | return true; | ||
748 | } | 748 | } | ||
749 | if (repaintsPending(Workspace::self()->deletedList())) { | 749 | if (repaintsPending(Workspace::self()->deletedList())) { | ||
750 | return true; | 750 | return true; | ||
751 | } | 751 | } | ||
752 | if (auto *server = waylandServer()) { | 752 | if (auto *server = waylandServer()) { | ||
753 | const auto &clients = server->clients(); | 753 | const auto &clients = server->clients(); | ||
754 | auto test = [](ShellClient *c) { | 754 | auto test = [](XdgShellClient *c) { | ||
755 | return c->readyForPainting() && !c->repaints().isEmpty(); | 755 | return c->readyForPainting() && !c->repaints().isEmpty(); | ||
756 | }; | 756 | }; | ||
757 | if (std::any_of(clients.begin(), clients.end(), test)) { | 757 | if (std::any_of(clients.begin(), clients.end(), test)) { | ||
758 | return true; | 758 | return true; | ||
759 | } | 759 | } | ||
760 | } | 760 | } | ||
761 | const auto &internalClients = workspace()->internalClients(); | 761 | const auto &internalClients = workspace()->internalClients(); | ||
762 | auto internalTest = [] (InternalClient *client) { | 762 | auto internalTest = [] (InternalClient *client) { | ||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |