2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Provided more context for click handlers.

This commit is contained in:
23rd
2021-07-26 19:27:08 +03:00
parent 7c8b1cd5b1
commit 93bcd90fd4
10 changed files with 114 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "api/api_common.h"
#include "chat_helpers/gifs_list_widget.h" // ChatHelpers::AddGifAction
#include "chat_helpers/send_context_menu.h" // SendMenu::FillSendMenu
#include "core/click_handler_types.h"
#include "data/data_file_origin.h"
#include "data/data_user.h"
#include "data/data_changes.h"
@@ -237,7 +238,12 @@ void Inner::mouseReleaseEvent(QMouseEvent *e) {
if (dynamic_cast<SendClickHandler*>(activated.get()) || open) {
selectInlineResult(_selected, {}, !!open);
} else {
ActivateClickHandler(window(), activated, e->button());
ActivateClickHandler(window(), activated, {
e->button(),
QVariant::fromValue(ClickHandlerContext{
.sessionWindow = base::make_weak(_controller.get()),
})
});
}
}