Changeset View
Changeset View
Standalone View
Standalone View
composite.cpp
Show First 20 Lines • Show All 954 Lines • ▼ Show 20 Line(s) | 953 | if (kwinApp()->operationMode() == Application::OperationModeX11 && !surface()) { | |||
---|---|---|---|---|---|
955 | xcb_damage_create(connection(), damage_handle, frameId(), XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY); | 955 | xcb_damage_create(connection(), damage_handle, frameId(), XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY); | ||
956 | } | 956 | } | ||
957 | 957 | | |||
958 | damage_region = QRegion(0, 0, width(), height()); | 958 | damage_region = QRegion(0, 0, width(), height()); | ||
959 | effect_window = new EffectWindowImpl(this); | 959 | effect_window = new EffectWindowImpl(this); | ||
960 | 960 | | |||
961 | Compositor::self()->scene()->addToplevel(this); | 961 | Compositor::self()->scene()->addToplevel(this); | ||
962 | 962 | | |||
963 | // With unmanaged windows there is a race condition between the client painting the window | | |||
964 | // and us setting up damage tracking. If the client wins we won't get a damage event even | | |||
965 | // though the window has been painted. To avoid this we mark the whole window as damaged | | |||
966 | // and schedule a repaint immediately after creating the damage object. | | |||
967 | if (dynamic_cast<Unmanaged*>(this)) | | |||
968 | addDamageFull(); | | |||
969 | | ||||
970 | return true; | 963 | return true; | ||
971 | } | 964 | } | ||
972 | 965 | | |||
973 | void Toplevel::finishCompositing(ReleaseReason releaseReason) | 966 | void Toplevel::finishCompositing(ReleaseReason releaseReason) | ||
974 | { | 967 | { | ||
975 | if (kwinApp()->operationMode() == Application::OperationModeX11 && damage_handle == XCB_NONE) | 968 | if (kwinApp()->operationMode() == Application::OperationModeX11 && damage_handle == XCB_NONE) | ||
976 | return; | 969 | return; | ||
977 | if (effect_window->window() == this) { // otherwise it's already passed to Deleted, don't free data | 970 | if (effect_window->window() == this) { // otherwise it's already passed to Deleted, don't free data | ||
▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines |