mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
moved almost all Application to AppClass (autoupdate and singleinstance left), logs rewritten
This commit is contained in:
@@ -179,7 +179,7 @@ void MediaView::moveToScreen() {
|
||||
}
|
||||
|
||||
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);
|
||||
QRect avail = Sandboxer::screenGeometry(wndCenter);
|
||||
if (avail != geometry()) {
|
||||
setGeometry(avail);
|
||||
}
|
||||
@@ -586,7 +586,7 @@ void MediaView::onSaveAs() {
|
||||
}
|
||||
}
|
||||
activateWindow();
|
||||
App::app()->setActiveWindow(this);
|
||||
Sandboxer::setActiveWindow(this);
|
||||
setFocus();
|
||||
}
|
||||
|
||||
@@ -1074,7 +1074,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty
|
||||
show();
|
||||
psShowOverAll(this);
|
||||
activateWindow();
|
||||
App::app()->setActiveWindow(this);
|
||||
Sandboxer::setActiveWindow(this);
|
||||
setFocus();
|
||||
}
|
||||
}
|
||||
@@ -1990,7 +1990,7 @@ void MediaView::onCheckActive() {
|
||||
if (App::wnd() && isVisible()) {
|
||||
if (App::wnd()->isActiveWindow() && App::wnd()->hasFocus()) {
|
||||
activateWindow();
|
||||
App::app()->setActiveWindow(this);
|
||||
Sandboxer::setActiveWindow(this);
|
||||
setFocus();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user