mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Remove BypassWindowManagerHint in MediaView / Passport.
It makes all kinds of usages buggy, including choose file dialog. Fixes #4936. I hope fixes #4950, I hope fixes #4955, I hope fixes #3553.
This commit is contained in:
@@ -117,7 +117,7 @@ MediaView::MediaView()
|
||||
});
|
||||
handleAuthSessionChange();
|
||||
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::Tool | Qt::NoDropShadowWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint);
|
||||
moveToScreen();
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
@@ -125,7 +125,7 @@ MediaView::MediaView()
|
||||
|
||||
hide();
|
||||
createWinId();
|
||||
if (cPlatform() == dbipWindows) {
|
||||
if (cPlatform() != dbipMac && cPlatform() != dbipMacOld) {
|
||||
setWindowState(Qt::WindowFullScreen);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,8 @@ void MediaView::moveToScreen() {
|
||||
if (activeWindowScreen && myScreen && myScreen != activeWindowScreen) {
|
||||
windowHandle()->setScreen(activeWindowScreen);
|
||||
}
|
||||
auto available = activeWindow ? Sandbox::screenGeometry(activeWindow->geometry().center()) : QApplication::desktop()->screenGeometry();
|
||||
const auto screen = activeWindowScreen ? activeWindowScreen : QApplication::primaryScreen();
|
||||
const auto available = screen->geometry();
|
||||
if (geometry() != available) {
|
||||
setGeometry(available);
|
||||
}
|
||||
@@ -2847,7 +2848,7 @@ void MediaView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
_menu->deleteLater();
|
||||
_menu = 0;
|
||||
}
|
||||
_menu = new Ui::PopupMenu(nullptr, st::mediaviewPopupMenu);
|
||||
_menu = new Ui::PopupMenu(this, st::mediaviewPopupMenu);
|
||||
updateActions();
|
||||
for_const (auto &action, _actions) {
|
||||
_menu->addAction(action.text, this, action.member);
|
||||
|
Reference in New Issue
Block a user