mirror of https://github.com/procxx/kepka.git
Activate window on dropEvent.
This commit is contained in:
parent
b1f33890d6
commit
3f751bfbb0
|
@ -811,6 +811,7 @@ void DialogsWidget::dropEvent(QDropEvent *e) {
|
||||||
if (auto peer = _inner->updateFromParentDrag(mapToGlobal(e->pos()))) {
|
if (auto peer = _inner->updateFromParentDrag(mapToGlobal(e->pos()))) {
|
||||||
e->acceptProposedAction();
|
e->acceptProposedAction();
|
||||||
App::main()->onFilesOrForwardDrop(peer->id, e->mimeData());
|
App::main()->onFilesOrForwardDrop(peer->id, e->mimeData());
|
||||||
|
controller()->window()->activateWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,8 +565,14 @@ HistoryWidget::HistoryWidget(QWidget *parent, not_null<Window::Controller*> cont
|
||||||
|
|
||||||
_topShadow->hide();
|
_topShadow->hide();
|
||||||
|
|
||||||
_attachDragDocument->setDroppedCallback([this](const QMimeData *data) { confirmSendingFiles(data, CompressConfirm::No); });
|
_attachDragDocument->setDroppedCallback([this](const QMimeData *data) {
|
||||||
_attachDragPhoto->setDroppedCallback([this](const QMimeData *data) { confirmSendingFiles(data, CompressConfirm::Yes); });
|
confirmSendingFiles(data, CompressConfirm::No);
|
||||||
|
this->controller()->window()->activateWindow();
|
||||||
|
});
|
||||||
|
_attachDragPhoto->setDroppedCallback([this](const QMimeData *data) {
|
||||||
|
confirmSendingFiles(data, CompressConfirm::Yes);
|
||||||
|
this->controller()->window()->activateWindow();
|
||||||
|
});
|
||||||
|
|
||||||
connect(&_updateEditTimeLeftDisplay, SIGNAL(timeout()), this, SLOT(updateField()));
|
connect(&_updateEditTimeLeftDisplay, SIGNAL(timeout()), this, SLOT(updateField()));
|
||||||
|
|
||||||
|
|
|
@ -289,6 +289,8 @@ void CoverWidget::dropEvent(QDropEvent *e) {
|
||||||
e->acceptProposedAction();
|
e->acceptProposedAction();
|
||||||
|
|
||||||
showSetPhotoBox(img);
|
showSetPhotoBox(img);
|
||||||
|
|
||||||
|
App::wnd()->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoverWidget::paintDivider(Painter &p) {
|
void CoverWidget::paintDivider(Painter &p) {
|
||||||
|
|
Loading…
Reference in New Issue