[effects] Don't assume windowInputMouseEvents only carries QMouseEvents
A QEvent* is passed around, this could also be a QWheelEvent. Only present windows static casted, all other effects verified. Documentation is not existing, so we don't know what was intended.
This commit is contained in:
parent
5cfadf72a1
commit
7718b6dce3
1 changed files with 4 additions and 1 deletions
|
@ -533,7 +533,10 @@ bool PresentWindowsEffect::borderActivated(ElectricBorder border)
|
|||
|
||||
void PresentWindowsEffect::windowInputMouseEvent(QEvent *e)
|
||||
{
|
||||
QMouseEvent* me = static_cast< QMouseEvent* >(e);
|
||||
QMouseEvent* me = dynamic_cast< QMouseEvent* >(e);
|
||||
if (!me) {
|
||||
return;
|
||||
}
|
||||
if (m_closeView) {
|
||||
const bool contains = m_closeView->geometry().contains(me->pos());
|
||||
if (!m_closeView->isVisible() && contains) {
|
||||
|
|
Loading…
Reference in a new issue