diff options
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index e581e1c2..ef5f271c 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -278,9 +278,11 @@ void UserWidget::slotOpenDir(){ void UserWidget::mouseMoveEvent( QMouseEvent *event){ QTabBar *wid = tabBar(); - qDebug() << "Mouse Move Event:"; - if(wid && wid->tabAt(event->pos()) != -1){ + if(wid==0){ return; } //invalid widget found + QPoint relpos = wid->mapFromGlobal( this->mapToGlobal(event->pos()) ); + //qDebug() << "Mouse Move Event: " << event->pos().x() << event->pos().y() << relpos.x() << relpos.y() << wid->width() << wid->height(); + if(wid && wid->tabAt(relpos) != -1){ qDebug() << " - Mouse over tab"; - this->setCurrentIndex( wid->tabAt(event->pos()) ); + this->setCurrentIndex( wid->tabAt(relpos) ); } }
\ No newline at end of file |