Changeset View
Changeset View
Standalone View
Standalone View
x11client.cpp
Show First 20 Lines • Show All 2338 Lines • ▼ Show 20 Line(s) | 2335 | if (icon.isNull()) { | |||
---|---|---|---|---|---|
2339 | icon.addPixmap(KWindowSystem::icon(window(), 64, 64, false, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); | 2339 | icon.addPixmap(KWindowSystem::icon(window(), 64, 64, false, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); | ||
2340 | icon.addPixmap(KWindowSystem::icon(window(), 128, 128, false, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); | 2340 | icon.addPixmap(KWindowSystem::icon(window(), 128, 128, false, KWindowSystem::ClassHint | KWindowSystem::XApp, info)); | ||
2341 | } | 2341 | } | ||
2342 | setIcon(icon); | 2342 | setIcon(icon); | ||
2343 | } | 2343 | } | ||
2344 | 2344 | | |||
2345 | void X11Client::getSyncCounter() | 2345 | void X11Client::getSyncCounter() | ||
2346 | { | 2346 | { | ||
2347 | // TODO: make sync working on XWayland | 2347 | if (!Xcb::Extensions::self()->isSyncAvailable()) | ||
2348 | static const bool isX11 = kwinApp()->operationMode() == Application::OperationModeX11; | | |||
2349 | if (!Xcb::Extensions::self()->isSyncAvailable() || !isX11) | | |||
2350 | return; | 2348 | return; | ||
2351 | 2349 | | |||
2352 | Xcb::Property syncProp(false, window(), atoms->net_wm_sync_request_counter, XCB_ATOM_CARDINAL, 0, 1); | 2350 | Xcb::Property syncProp(false, window(), atoms->net_wm_sync_request_counter, XCB_ATOM_CARDINAL, 0, 1); | ||
2353 | const xcb_sync_counter_t counter = syncProp.value<xcb_sync_counter_t>(XCB_NONE); | 2351 | const xcb_sync_counter_t counter = syncProp.value<xcb_sync_counter_t>(XCB_NONE); | ||
2354 | if (counter != XCB_NONE) { | 2352 | if (counter != XCB_NONE) { | ||
2355 | m_syncRequest.counter = counter; | 2353 | m_syncRequest.counter = counter; | ||
2356 | m_syncRequest.value.hi = 0; | 2354 | m_syncRequest.value.hi = 0; | ||
2357 | m_syncRequest.value.lo = 0; | 2355 | m_syncRequest.value.lo = 0; | ||
▲ Show 20 Lines • Show All 548 Lines • ▼ Show 20 Line(s) | 2900 | { | |||
2906 | if (m_syncRequest.failsafeTimeout) { | 2904 | if (m_syncRequest.failsafeTimeout) { | ||
2907 | m_syncRequest.failsafeTimeout->stop(); | 2905 | m_syncRequest.failsafeTimeout->stop(); | ||
2908 | } | 2906 | } | ||
2909 | if (isResize()) { | 2907 | if (isResize()) { | ||
2910 | if (m_syncRequest.timeout) { | 2908 | if (m_syncRequest.timeout) { | ||
2911 | m_syncRequest.timeout->stop(); | 2909 | m_syncRequest.timeout->stop(); | ||
2912 | } | 2910 | } | ||
2913 | performMoveResize(); | 2911 | performMoveResize(); | ||
2914 | updateWindowPixmap(); | 2912 | updateWindowPixmap(); | ||
meven: Is it necessary to call this here ?
Added in https://phabricator.kde.org/D26914
I have tried… | |||||
Yes, because user can resize a window more than once during a vblank interval and it's not guaranteed that there won't be any pending sync requests before the next compositing cycle starts. zzag: Yes, because user can resize a window more than once during a vblank interval and it's not… | |||||
2915 | } else // setReadyForPainting does as well, but there's a small chance for resize syncs after the resize ended | 2913 | } else // setReadyForPainting does as well, but there's a small chance for resize syncs after the resize ended | ||
2916 | addRepaintFull(); | 2914 | addRepaintFull(); | ||
2917 | } | 2915 | } | ||
2918 | 2916 | | |||
2919 | void X11Client::move(int x, int y, ForceGeometry_t force) | 2917 | void X11Client::move(int x, int y, ForceGeometry_t force) | ||
2920 | { | 2918 | { | ||
2921 | const QPoint framePosition(x, y); | 2919 | const QPoint framePosition(x, y); | ||
2922 | m_clientGeometry.moveTopLeft(framePosToClientPos(framePosition)); | 2920 | m_clientGeometry.moveTopLeft(framePosToClientPos(framePosition)); | ||
▲ Show 20 Lines • Show All 2118 Lines • Show Last 20 Lines |
Is it necessary to call this here ?
Added in https://phabricator.kde.org/D26914
I have tried removing it and in X it seems unoticeable and in Wayland gets rid of the flickering and my XWayland window matches Xorg behavior.