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:
parent
d208698143
commit
625b852ba7
@ -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()
|
||||
{
|
||||
|
@ -284,7 +284,6 @@ protected slots:
|
||||
|
||||
protected:
|
||||
bool event(QEvent *ev) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
|
||||
signals:
|
||||
void eventTriggered(QEvent *ev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user