2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix mouse input in layers in call window.

This commit is contained in:
John Preston
2021-08-11 11:06:34 +03:00
parent fff42a664c
commit 46885b7f9f
3 changed files with 18 additions and 6 deletions

View File

@@ -77,6 +77,9 @@ Panel::Panel(not_null<Call*> call)
, _mute(widget(), st::callMicrophoneMute, &st::callMicrophoneUnmute)
, _name(widget(), st::callName)
, _status(widget(), st::callStatus) {
_layerBg->setStyleOverrides(&st::groupCallBox, &st::groupCallLayerBox);
_layerBg->setHideByBackgroundClick(true);
_decline->setDuration(st::callPanelDuration);
_decline->entity()->setText(tr::lng_call_decline());
_cancel->setDuration(st::callPanelDuration);
@@ -158,9 +161,13 @@ void Panel::initWindow() {
_answerHangupRedial->height()).contains(widgetPoint)
|| (!_outgoingPreviewInBody
&& _outgoingVideoBubble->geometry().contains(widgetPoint));
return inControls
? Flag::None
: (Flag::Move | Flag::FullScreen);
if (inControls) {
return Flag::None | Flag(0);
}
const auto shown = _layerBg->topShownLayer();
return (!shown || !shown->geometry().contains(widgetPoint))
? (Flag::Move | Flag::FullScreen)
: Flag::None;
});
// Don't do that, it looks awful :(