diff --git a/workspace.cpp b/workspace.cpp index 15e791e7bb..1744badc5d 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -28,6 +28,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include #include #include "plugins.h" @@ -1715,7 +1716,7 @@ unsigned int Workspace::sendFakedMouseEvent( QPoint pos, WId w, MouseEmulation t if ( !w ) return state; QWidget* widget = QWidget::find( w ); - if ( (!widget || widget->inherits("QToolButton") ) && !findClient( WindowMatchPredicate( w )) ) + if ( (!widget || qobject_cast(widget)) && !findClient( WindowMatchPredicate( w )) ) { int x, y; Window xw;