lib_ui/ui
Loïc Molinari f783243e13 Fix dangling timer event in animations manager
A race condition in the animations manager can leave a dangling
timerEvent() callback firing at a high frequency (>120 FPS) in the
main loop even though there is no active animations.

An update of the animations manager returns directly when there is no
active animations. If there is at least one active animation, it stops
the timer and schedules a new update before updating animations.
Depending on the Integration implementation, the scheduling call can
be postponed after the current update. The actual postponed call
unconditionally schedules an update by starting the timer. The issue
is that in the meantime the last remaining animation could have been
removed and, when the timer callback would be fired, the update would
return directly (since there is no active animations) without being
able to stop.

The explanation above ignores the updateQueued() cases of the
postponed call for simplicity. These cases do not result in infinite
updates like the timer case but still imply one useless (invoked)
update.

This fix adds a condition in the postponed call ensuring there is at
least one active animation before processing.

telegramdesktop/tdesktop#3640
telegramdesktop/tdesktop#4854
telegramdesktop/tdesktop#5436
2021-04-11 12:48:27 +03:00
..
effects Fix dangling timer event in animations manager 2021-04-11 12:48:27 +03:00
image Get rid of deprecated ranges::view usage 2021-03-13 19:06:44 +03:00
layers Allow changing GenericBox later. 2021-04-07 15:42:12 +04:00
paint Restore opacity in ArcsAnimation::paint. 2021-03-22 18:10:28 +04:00
platform Add a method to clear transient parent 2021-04-05 10:16:46 +03:00
style Add a new color and style::complex_color. 2021-04-02 14:14:47 +04:00
text Support 64 bit mention ids in entities. 2021-04-08 16:19:50 +04:00
toast Fix build on Xcode. 2020-04-30 17:18:04 +04:00
widgets Add custom brush support in RoundButton. 2021-04-06 13:58:45 +04:00
wrap Added ability to finish reordering in vertical layout from external. 2020-03-28 18:51:00 +03:00
abstract_button.cpp Only handle left button clicks. 2020-01-28 09:32:58 +03:00
abstract_button.h Allow triggering buttons in boxes from code. 2019-09-26 09:53:57 +03:00
basic.style Change button round radius. 2020-12-08 11:12:46 +04:00
basic_click_handlers.cpp Don't expand urls same as text. 2020-10-08 12:00:28 +03:00
basic_click_handlers.h Don't expand urls same as text. 2020-10-08 12:00:28 +03:00
click_handler.cpp Allow passing std::any context to link creation method. 2020-06-09 13:04:44 +04:00
click_handler.h Allow LambdaClickHandler to see context. 2020-11-10 21:50:49 +03:00
colors.palette Add a new color and style::complex_color. 2021-04-02 14:14:47 +04:00
delayed_activation.cpp Initial commit. 2019-09-17 17:48:58 +03:00
delayed_activation.h Initial commit. 2019-09-17 17:48:58 +03:00
emoji_config.cpp Get rid of deprecated ranges::view usage 2021-03-13 19:06:44 +03:00
emoji_config.h Save set id that failed to load. 2020-05-07 19:04:45 +04:00
focus_persister.h Initial commit. 2019-09-17 17:48:58 +03:00
inactive_press.cpp Initial commit. 2019-09-17 17:48:58 +03:00
inactive_press.h Initial commit. 2019-09-17 17:48:58 +03:00
integration.cpp Remove not-needed Integration::modalWindowParent. 2021-04-06 18:52:43 +04:00
integration.h Remove not-needed Integration::modalWindowParent. 2021-04-06 18:52:43 +04:00
main_queue_processor.cpp Use base::Integration. 2019-10-26 22:21:47 +03:00
main_queue_processor.h Initial commit. 2019-09-17 17:48:58 +03:00
painter.h Fix deprecation warnings on Qt 5.15.1. 2020-11-04 18:44:45 +03:00
ph.cpp Allow creating ph::phrase from rpl::producer. 2019-10-14 17:37:19 +04:00
ph.h Allow creating ph::phrase from rpl::producer. 2019-10-14 17:37:19 +04:00
rect_part.h Initial commit. 2019-09-17 17:48:58 +03:00
round_rect.cpp Allow different styles for box layers. 2020-11-29 21:26:20 +03:00
round_rect.h Allow different styles for box layers. 2020-11-29 21:26:20 +03:00
rp_widget.cpp Add traits for customizing RpWidgetWrap instances. 2021-01-05 21:09:05 +04:00
rp_widget.h Add traits for customizing RpWidgetWrap instances. 2021-01-05 21:09:05 +04:00
ui_log.cpp Don't crash on log calls even without integration. 2019-10-03 10:28:24 +03:00
ui_log.h Initial commit. 2019-09-17 17:48:58 +03:00
ui_pch.h Initial commit. 2019-09-17 17:48:58 +03:00
ui_utility.cpp Remove a workaround for Qt 5.6. 2020-06-04 13:21:51 +04:00
ui_utility.h Fix build on macOS. 2020-10-14 11:27:55 +03:00