From aaa4d8c32331cbb6aad933f381b5b0ce3ffd0ed4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 21 Dec 2017 13:17:38 +0200 Subject: [PATCH] Prevent emoji selector for closing fixes #176 --- include/emoji/PickButton.h | 1 - src/emoji/PickButton.cc | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/include/emoji/PickButton.h b/include/emoji/PickButton.h index d0026828..9c30a549 100644 --- a/include/emoji/PickButton.h +++ b/include/emoji/PickButton.h @@ -37,7 +37,6 @@ signals: protected: void enterEvent(QEvent *e) override; - void leaveEvent(QEvent *e) override; private: // Vertical distance from panel's bottom. diff --git a/src/emoji/PickButton.cc b/src/emoji/PickButton.cc index ca3b3017..530c951b 100644 --- a/src/emoji/PickButton.cc +++ b/src/emoji/PickButton.cc @@ -46,21 +46,3 @@ PickButton::enterEvent(QEvent *e) panel_->move(x, y); panel_->show(); } - -void -PickButton::leaveEvent(QEvent *e) -{ - Q_UNUSED(e); - - if (panel_->underMouse()) - return; - - auto pos = QCursor::pos(); - auto panel_geometry = panel_->geometry(); - panel_geometry.adjust(0, 0, 0, vertical_distance_); - - if (panel_geometry.contains(pos)) - return; - - panel_->hide(); -}