From b5b520ab6641bc9e0e3d60ce5a077b4873afa90c Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 7 Jan 2020 15:16:28 +0300 Subject: [PATCH] Make non-activatable PiP window. --- Telegram/SourceFiles/media/view/media_view_pip.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/media/view/media_view_pip.cpp b/Telegram/SourceFiles/media/view/media_view_pip.cpp index 6d2e3267b..6f97722d7 100644 --- a/Telegram/SourceFiles/media/view/media_view_pip.cpp +++ b/Telegram/SourceFiles/media/view/media_view_pip.cpp @@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "media/streaming/media_streaming_document.h" #include "media/streaming/media_streaming_utility.h" #include "core/application.h" +#include "ui/platform/ui_platform_utility.h" #include "window/window_controller.h" #include "styles/style_window.h" #include "styles/style_mediaview.h" @@ -200,10 +201,13 @@ PipPanel::PipPanel( , _paint(std::move(paint)) { setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint - | Qt::FramelessWindowHint); + | Qt::FramelessWindowHint + | Qt::WindowDoesNotAcceptFocus); setAttribute(Qt::WA_ShowWithoutActivating); setMouseTracking(true); resize(0, 0); + show(); + Ui::Platform::IgnoreAllActivation(this); } void PipPanel::setAspectRatio(QSize ratio) {