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