mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Remove old window activation workaround for X11 systems
There seem to be no need in it anymore
This commit is contained in:
parent
2673e1df53
commit
e4d88f829c
6 changed files with 0 additions and 34 deletions
|
@ -2216,9 +2216,6 @@ void OverlayWidget::close() {
|
|||
return;
|
||||
}
|
||||
hide();
|
||||
if (const auto window = Core::App().activeWindow()) {
|
||||
window->reActivate();
|
||||
}
|
||||
_helper->clearState();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "main/main_session.h"
|
||||
#include "main/main_session_settings.h"
|
||||
#include "base/options.h"
|
||||
#include "base/call_delayed.h"
|
||||
#include "base/crc32hash.h"
|
||||
#include "ui/toast/toast.h"
|
||||
#include "ui/widgets/shadow.h"
|
||||
|
@ -951,28 +950,6 @@ bool MainWindow::minimizeToTray() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void MainWindow::reActivateWindow() {
|
||||
// X11 is the only platform with unreliable activate requests
|
||||
if (!Platform::IsX11()) {
|
||||
return;
|
||||
}
|
||||
const auto weak = Ui::MakeWeak(this);
|
||||
const auto reActivate = [=] {
|
||||
if (const auto w = weak.data()) {
|
||||
if (auto f = QApplication::focusWidget()) {
|
||||
f->clearFocus();
|
||||
}
|
||||
w->activate();
|
||||
if (auto f = QApplication::focusWidget()) {
|
||||
f->clearFocus();
|
||||
}
|
||||
w->setInnerFocus();
|
||||
}
|
||||
};
|
||||
crl::on_main(this, reActivate);
|
||||
base::call_delayed(200, this, reActivate);
|
||||
}
|
||||
|
||||
void MainWindow::showRightColumn(object_ptr<TWidget> widget) {
|
||||
const auto wasWidth = width();
|
||||
const auto wasRightWidth = _rightColumn ? _rightColumn->width() : 0;
|
||||
|
|
|
@ -98,8 +98,6 @@ public:
|
|||
}
|
||||
void positionUpdated();
|
||||
|
||||
void reActivateWindow();
|
||||
|
||||
void showRightColumn(object_ptr<TWidget> widget);
|
||||
int maximalExtendBy() const;
|
||||
bool canExtendNoMove(int extendBy) const;
|
||||
|
|
|
@ -1076,7 +1076,6 @@ void Manager::notificationActivated(
|
|||
history->setLocalDraft(std::move(draft));
|
||||
}
|
||||
window->widget()->showFromTray();
|
||||
window->widget()->reActivateWindow();
|
||||
if (Core::App().passcodeLocked()) {
|
||||
window->widget()->setInnerFocus();
|
||||
system()->clearAll();
|
||||
|
|
|
@ -444,10 +444,6 @@ void Controller::activate() {
|
|||
_widget.activate();
|
||||
}
|
||||
|
||||
void Controller::reActivate() {
|
||||
_widget.reActivateWindow();
|
||||
}
|
||||
|
||||
void Controller::updateIsActiveFocus() {
|
||||
_isActiveTimer.callOnce(sessionController()
|
||||
? sessionController()->session().serverConfig().onlineFocusTimeout
|
||||
|
|
|
@ -119,7 +119,6 @@ public:
|
|||
}
|
||||
|
||||
void activate();
|
||||
void reActivate();
|
||||
void updateIsActiveFocus();
|
||||
void updateIsActiveBlur();
|
||||
void updateIsActive();
|
||||
|
|
Loading…
Add table
Reference in a new issue