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 318 Lines • ▼ Show 20 Line(s) | 326 | { | |||
360 | } | 360 | } | ||
361 | for (InternalClient *client : workspace()->internalClients()) { | 361 | for (InternalClient *client : workspace()->internalClients()) { | ||
362 | client->setupCompositing(); | 362 | client->setupCompositing(); | ||
363 | client->getShadow(); | 363 | client->getShadow(); | ||
364 | } | 364 | } | ||
365 | 365 | | |||
366 | if (auto *server = waylandServer()) { | 366 | if (auto *server = waylandServer()) { | ||
367 | const auto clients = server->clients(); | 367 | const auto clients = server->clients(); | ||
368 | for (ShellClient *c : clients) { | 368 | for (XdgShellClient *c : clients) { | ||
369 | c->setupCompositing(); | 369 | c->setupCompositing(); | ||
370 | c->getShadow(); | 370 | c->getShadow(); | ||
371 | } | 371 | } | ||
372 | } | 372 | } | ||
373 | 373 | | |||
374 | m_state = State::On; | 374 | m_state = State::On; | ||
375 | emit compositingToggled(true); | 375 | emit compositingToggled(true); | ||
376 | 376 | | |||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 434 | xcb_composite_unredirect_subwindows(con, kwinApp()->x11RootWindow(), | |||
435 | XCB_COMPOSITE_REDIRECT_MANUAL); | 435 | XCB_COMPOSITE_REDIRECT_MANUAL); | ||
436 | } | 436 | } | ||
437 | while (!workspace()->deletedList().isEmpty()) { | 437 | while (!workspace()->deletedList().isEmpty()) { | ||
438 | workspace()->deletedList().first()->discard(); | 438 | workspace()->deletedList().first()->discard(); | ||
439 | } | 439 | } | ||
440 | } | 440 | } | ||
441 | 441 | | |||
442 | if (waylandServer()) { | 442 | if (waylandServer()) { | ||
443 | for (ShellClient *c : waylandServer()->clients()) { | 443 | for (XdgShellClient *c : waylandServer()->clients()) { | ||
444 | m_scene->removeToplevel(c); | 444 | m_scene->removeToplevel(c); | ||
445 | } | 445 | } | ||
446 | for (ShellClient *c : waylandServer()->clients()) { | 446 | for (XdgShellClient *c : waylandServer()->clients()) { | ||
447 | c->finishCompositing(); | 447 | c->finishCompositing(); | ||
448 | } | 448 | } | ||
449 | } | 449 | } | ||
450 | 450 | | |||
451 | delete m_scene; | 451 | delete m_scene; | ||
452 | m_scene = nullptr; | 452 | m_scene = nullptr; | ||
453 | compositeTimer.stop(); | 453 | compositeTimer.stop(); | ||
454 | repaints_region = QRegion(); | 454 | repaints_region = QRegion(); | ||
▲ Show 20 Lines • Show All 288 Lines • ▼ Show 20 Line(s) | 736 | { | |||
743 | if (repaintsPending(Workspace::self()->unmanagedList())) { | 743 | if (repaintsPending(Workspace::self()->unmanagedList())) { | ||
744 | return true; | 744 | return true; | ||
745 | } | 745 | } | ||
746 | if (repaintsPending(Workspace::self()->deletedList())) { | 746 | if (repaintsPending(Workspace::self()->deletedList())) { | ||
747 | return true; | 747 | return true; | ||
748 | } | 748 | } | ||
749 | if (auto *server = waylandServer()) { | 749 | if (auto *server = waylandServer()) { | ||
750 | const auto &clients = server->clients(); | 750 | const auto &clients = server->clients(); | ||
751 | auto test = [](ShellClient *c) { | 751 | auto test = [](XdgShellClient *c) { | ||
752 | return c->readyForPainting() && !c->repaints().isEmpty(); | 752 | return c->readyForPainting() && !c->repaints().isEmpty(); | ||
753 | }; | 753 | }; | ||
754 | if (std::any_of(clients.begin(), clients.end(), test)) { | 754 | if (std::any_of(clients.begin(), clients.end(), test)) { | ||
755 | return true; | 755 | return true; | ||
756 | } | 756 | } | ||
757 | } | 757 | } | ||
758 | const auto &internalClients = workspace()->internalClients(); | 758 | const auto &internalClients = workspace()->internalClients(); | ||
759 | auto internalTest = [] (InternalClient *client) { | 759 | auto internalTest = [] (InternalClient *client) { | ||
▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines |