diff options
-rw-r--r-- | client/macrodrawer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/macrodrawer.cc b/client/macrodrawer.cc index 47edc22..89bd255 100644 --- a/client/macrodrawer.cc +++ b/client/macrodrawer.cc @@ -65,7 +65,10 @@ bool MacroDrawer::eventFilter(QObject *obj, QEvent *event) { if(event->type() == QEvent::MouseButtonRelease) { QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event); - if(mouseEvent->y() < 16 && isEnabled()) emit toggle(); + if(mouseEvent->y() < 16 && isEnabled() && + // Temporay hack. TODO: Calculate actual text width. + mouseEvent->x() < title().length() * 5) + emit toggle(); } return QObject::eventFilter(obj, event); } |