1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-12 00:58:18 +03:00

view:remove mousePressed slot

This commit is contained in:
Michail Vourlakos 2022-05-22 18:06:47 +03:00
parent d208698143
commit 625b852ba7
2 changed files with 13 additions and 10 deletions

View File

@ -721,16 +721,27 @@ void View::statusChanged(Plasma::Types::ItemStatus status)
m_visibility->addBlockHidingEvent(BLOCKHIDINGNEEDSATTENTIONTYPE);
setFlags(flags() | Qt::WindowDoesNotAcceptFocus);
m_visibility->initViewFlags();
if (m_shellSurface) {
m_shellSurface->setPanelTakesFocus(false);
}
} else if (status == Plasma::Types::AcceptingInputStatus) {
m_visibility->removeBlockHidingEvent(BLOCKHIDINGNEEDSATTENTIONTYPE);
setFlags(flags() & ~Qt::WindowDoesNotAcceptFocus);
m_visibility->initViewFlags();
KWindowSystem::forceActiveWindow(winId());
if (KWindowSystem::isPlatformX11()) {
KWindowSystem::forceActiveWindow(winId());
}
if (m_shellSurface) {
m_shellSurface->setPanelTakesFocus(true);
}
} else {
updateTransientWindowsTracking();
m_visibility->removeBlockHidingEvent(BLOCKHIDINGNEEDSATTENTIONTYPE);
setFlags(flags() | Qt::WindowDoesNotAcceptFocus);
m_visibility->initViewFlags();
if (m_shellSurface) {
m_shellSurface->setPanelTakesFocus(false);
}
}
}
@ -1536,6 +1547,7 @@ bool View::event(QEvent *e)
if (auto me = dynamic_cast<QMouseEvent *>(e)) {
emit mousePressed(me->pos(), me->button());
sinkableevent = true;
verticalUnityViewHasFocus();
}
break;
@ -1706,14 +1718,6 @@ void View::verticalUnityViewHasFocus()
}
//! END: WORKAROUND
//!BEGIN overriding context menus behavior
void View::mousePressEvent(QMouseEvent *event)
{
PlasmaQuick::ContainmentView::mousePressEvent(event);
verticalUnityViewHasFocus();
}
//!END overriding context menus behavior
//!BEGIN configuration functions
void View::saveConfig()
{

View File

@ -284,7 +284,6 @@ protected slots:
protected:
bool event(QEvent *ev) override;
void mousePressEvent(QMouseEvent *event) override;
signals:
void eventTriggered(QEvent *ev);