Changeset View
Changeset View
Standalone View
Standalone View
autotests/kwindoweffectstest.cpp
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Line(s) | 132 | { | |||
---|---|---|---|---|---|
137 | QTest::newRow("Top") << KWindowEffects::TopEdge; | 137 | QTest::newRow("Top") << KWindowEffects::TopEdge; | ||
138 | QTest::newRow("Bottom") << KWindowEffects::BottomEdge; | 138 | QTest::newRow("Bottom") << KWindowEffects::BottomEdge; | ||
139 | } | 139 | } | ||
140 | 140 | | |||
141 | void KWindowEffectsTest::testSlideWindowWidget() | 141 | void KWindowEffectsTest::testSlideWindowWidget() | ||
142 | { | 142 | { | ||
143 | QFETCH(KWindowEffects::SlideFromLocation, location); | 143 | QFETCH(KWindowEffects::SlideFromLocation, location); | ||
144 | 144 | | |||
145 | KWindowEffects::slideWindow(m_widget.data(), location); | 145 | KWindowEffects::slideWindow(m_widget->effectiveWinId(), location); | ||
146 | performSlideWindowTest(m_widget->effectiveWinId(), -1, location); | 146 | performSlideWindowTest(m_widget->effectiveWinId(), -1, location); | ||
147 | } | 147 | } | ||
148 | 148 | | |||
149 | void KWindowEffectsTest::testSlideWindowWidgetRemove() | 149 | void KWindowEffectsTest::testSlideWindowWidgetRemove() | ||
150 | { | 150 | { | ||
151 | xcb_window_t window = m_widget->effectiveWinId(); | 151 | xcb_window_t window = m_widget->effectiveWinId(); | ||
152 | // first install the atom | 152 | // first install the atom | ||
153 | KWindowEffects::slideWindow(m_widget.data(), KWindowEffects::TopEdge); | 153 | KWindowEffects::slideWindow(m_widget->effectiveWinId(), KWindowEffects::TopEdge); | ||
154 | performSlideWindowTest(window, -1, KWindowEffects::TopEdge); | 154 | performSlideWindowTest(window, -1, KWindowEffects::TopEdge); | ||
155 | 155 | | |||
156 | // now delete it | 156 | // now delete it | ||
157 | KWindowEffects::slideWindow(m_widget.data(), KWindowEffects::NoEdge); | 157 | KWindowEffects::slideWindow(m_widget->effectiveWinId(), KWindowEffects::NoEdge); | ||
158 | performSlideWindowRemoveTest(window); | 158 | performSlideWindowRemoveTest(window); | ||
159 | } | 159 | } | ||
160 | 160 | | |||
161 | void KWindowEffectsTest::performSlideWindowTest(xcb_window_t window, int offset, KWindowEffects::SlideFromLocation location) const | 161 | void KWindowEffectsTest::performSlideWindowTest(xcb_window_t window, int offset, KWindowEffects::SlideFromLocation location) const | ||
162 | { | 162 | { | ||
163 | xcb_connection_t *c = QX11Info::connection(); | 163 | xcb_connection_t *c = QX11Info::connection(); | ||
164 | xcb_get_property_cookie_t cookie = xcb_get_property_unchecked(c, false, window, m_slide, m_slide, 0, 100); | 164 | xcb_get_property_cookie_t cookie = xcb_get_property_unchecked(c, false, window, m_slide, m_slide, 0, 100); | ||
165 | QScopedPointer<xcb_get_property_reply_t, QScopedPointerPodDeleter> reply(xcb_get_property_reply(c, cookie, nullptr)); | 165 | QScopedPointer<xcb_get_property_reply_t, QScopedPointerPodDeleter> reply(xcb_get_property_reply(c, cookie, nullptr)); | ||
▲ Show 20 Lines • Show All 302 Lines • Show Last 20 Lines |