mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-26 02:20:46 +00:00
Handle only left click on voice chat bar.
This commit is contained in:
parent
9e79b59cce
commit
05ffc79539
@ -220,7 +220,9 @@ void GroupCallBar::setupInner() {
|
||||
_inner->setCursor(style::cur_pointer);
|
||||
_inner->events(
|
||||
) | rpl::filter([=](not_null<QEvent*> event) {
|
||||
return (event->type() == QEvent::MouseButtonPress);
|
||||
return (event->type() == QEvent::MouseButtonPress)
|
||||
&& (static_cast<QMouseEvent*>(event.get())->button()
|
||||
== Qt::LeftButton);
|
||||
}) | rpl::map([=] {
|
||||
return _inner->events(
|
||||
) | rpl::filter([=](not_null<QEvent*> event) {
|
||||
@ -441,7 +443,10 @@ rpl::producer<> GroupCallBar::barClicks() const {
|
||||
}
|
||||
|
||||
rpl::producer<> GroupCallBar::joinClicks() const {
|
||||
return _joinClicks.events() | rpl::to_empty;
|
||||
using namespace rpl::mappers;
|
||||
return _joinClicks.events()
|
||||
| rpl::filter(_1 == Qt::LeftButton)
|
||||
| rpl::to_empty;
|
||||
}
|
||||
|
||||
} // namespace Ui
|
||||
|
Loading…
Reference in New Issue
Block a user