Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 328 Lines • ▼ Show 20 Line(s) | 328 | [this](AbstractClient* c, bool animate) { | |||
---|---|---|---|---|---|
329 | // TODO: notify effects even if it should not animate? | 329 | // TODO: notify effects even if it should not animate? | ||
330 | if (animate) { | 330 | if (animate) { | ||
331 | emit windowUnminimized(c->effectWindow()); | 331 | emit windowUnminimized(c->effectWindow()); | ||
332 | } | 332 | } | ||
333 | } | 333 | } | ||
334 | ); | 334 | ); | ||
335 | connect(c, &AbstractClient::modalChanged, this, &EffectsHandlerImpl::slotClientModalityChanged); | 335 | connect(c, &AbstractClient::modalChanged, this, &EffectsHandlerImpl::slotClientModalityChanged); | ||
336 | connect(c, &AbstractClient::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged); | 336 | connect(c, &AbstractClient::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged); | ||
337 | connect(c, &AbstractClient::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged); | ||||
337 | connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged); | 338 | connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged); | ||
338 | connect(c, &AbstractClient::unresponsiveChanged, this, | 339 | connect(c, &AbstractClient::unresponsiveChanged, this, | ||
339 | [this, c](bool unresponsive) { | 340 | [this, c](bool unresponsive) { | ||
340 | emit windowUnresponsiveChanged(c->effectWindow(), unresponsive); | 341 | emit windowUnresponsiveChanged(c->effectWindow(), unresponsive); | ||
341 | } | 342 | } | ||
342 | ); | 343 | ); | ||
343 | connect(c, &AbstractClient::windowShown, this, | 344 | connect(c, &AbstractClient::windowShown, this, | ||
344 | [this](Toplevel *c) { | 345 | [this](Toplevel *c) { | ||
Show All 30 Lines | 374 | { | |||
375 | connect(c, &X11Client::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged); | 376 | connect(c, &X11Client::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged); | ||
376 | } | 377 | } | ||
377 | 378 | | |||
378 | void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u) | 379 | void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u) | ||
379 | { | 380 | { | ||
380 | connect(u, &Unmanaged::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed); | 381 | connect(u, &Unmanaged::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed); | ||
381 | connect(u, &Unmanaged::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged); | 382 | connect(u, &Unmanaged::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged); | ||
382 | connect(u, &Unmanaged::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged); | 383 | connect(u, &Unmanaged::geometryShapeChanged, this, &EffectsHandlerImpl::slotGeometryShapeChanged); | ||
384 | connect(u, &Unmanaged::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged); | ||||
383 | connect(u, &Unmanaged::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged); | 385 | connect(u, &Unmanaged::paddingChanged, this, &EffectsHandlerImpl::slotPaddingChanged); | ||
384 | connect(u, &Unmanaged::damaged, this, &EffectsHandlerImpl::slotWindowDamaged); | 386 | connect(u, &Unmanaged::damaged, this, &EffectsHandlerImpl::slotWindowDamaged); | ||
385 | } | 387 | } | ||
386 | 388 | | |||
387 | void EffectsHandlerImpl::reconfigure() | 389 | void EffectsHandlerImpl::reconfigure() | ||
388 | { | 390 | { | ||
389 | m_effectLoader->queryAndLoadAll(); | 391 | m_effectLoader->queryAndLoadAll(); | ||
390 | } | 392 | } | ||
▲ Show 20 Lines • Show All 241 Lines • ▼ Show 20 Line(s) | |||||
632 | { | 634 | { | ||
633 | // during late cleanup effectWindow() may be already NULL | 635 | // during late cleanup effectWindow() may be already NULL | ||
634 | // in some functions that may still call this | 636 | // in some functions that may still call this | ||
635 | if (t == nullptr || t->effectWindow() == nullptr) | 637 | if (t == nullptr || t->effectWindow() == nullptr) | ||
636 | return; | 638 | return; | ||
637 | emit windowGeometryShapeChanged(t->effectWindow(), old); | 639 | emit windowGeometryShapeChanged(t->effectWindow(), old); | ||
638 | } | 640 | } | ||
639 | 641 | | |||
642 | void EffectsHandlerImpl::slotFrameGeometryChanged(Toplevel *toplevel, const QRect &oldGeometry) | ||||
643 | { | ||||
644 | // effectWindow() might be nullptr during tear down of the client. | ||||
645 | if (toplevel->effectWindow()) { | ||||
646 | emit windowFrameGeometryChanged(toplevel->effectWindow(), oldGeometry); | ||||
647 | } | ||||
648 | } | ||||
649 | | ||||
640 | void EffectsHandlerImpl::slotPaddingChanged(Toplevel* t, const QRect& old) | 650 | void EffectsHandlerImpl::slotPaddingChanged(Toplevel* t, const QRect& old) | ||
641 | { | 651 | { | ||
642 | // during late cleanup effectWindow() may be already NULL | 652 | // during late cleanup effectWindow() may be already NULL | ||
643 | // in some functions that may still call this | 653 | // in some functions that may still call this | ||
644 | if (t == nullptr || t->effectWindow() == nullptr) | 654 | if (t == nullptr || t->effectWindow() == nullptr) | ||
645 | return; | 655 | return; | ||
646 | emit windowPaddingChanged(t->effectWindow(), old); | 656 | emit windowPaddingChanged(t->effectWindow(), old); | ||
647 | } | 657 | } | ||
▲ Show 20 Lines • Show All 1766 Lines • Show Last 20 Lines |