2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

fixed webpage handling

This commit is contained in:
John Preston
2015-09-28 17:19:37 +03:00
parent d8b421993d
commit 297b2f3dcf
5 changed files with 25 additions and 20 deletions

View File

@@ -134,6 +134,10 @@ _saveMsgStarted(0), _saveMsgOpacity(0)
}
void MediaView::moveToScreen() {
if (App::wnd() && windowHandle() && App::wnd()->windowHandle() && windowHandle()->screen() != App::wnd()->windowHandle()->screen()) {
windowHandle()->setScreen(App::wnd()->windowHandle()->screen());
}
QPoint wndCenter(App::wnd()->x() + App::wnd()->width() / 2, App::wnd()->y() + App::wnd()->height() / 2);
QRect avail = App::app() ? App::app()->desktop()->screenGeometry(wndCenter) : QDesktopWidget().screenGeometry(wndCenter);
if (avail != geometry()) {