summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Geints <[email protected]>2018-10-19 13:52:16 +0100
committerDavid Edmundson <[email protected]>2018-10-19 13:56:13 +0100
commit90466f3cd655e04f8de7a393ad0883488e8825ba (patch)
tree8a0c9b31e360fd97bd98c54e26fbcfa1f4088473
parent31e1a1a96ca2d03e4da1284d6e965b0877376570 (diff)
Fix Klipper popup opening on default screen instead of at cursor position
Reviewers: #plasma, davidedmundson Reviewed By: #plasma, davidedmundson Subscribers: mvourlakos, romangeints, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D15887
-rw-r--r--klipper/klipper.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/klipper/klipper.cpp b/klipper/klipper.cpp
index 97de688..a257dc5 100644
--- a/klipper/klipper.cpp
+++ b/klipper/klipper.cpp
@@ -373,15 +373,7 @@ void Klipper::showPopupMenu( QMenu* menu )
{
Q_ASSERT( menu != nullptr );
- QSize size = menu->sizeHint(); // geometry is not valid until it's shown
- QPoint pos = QCursor::pos();
- // ### We can't know where the systray icon is (since it can be hidden or shown
- // in several places), so the cursor position is the only option.
-
- if ( size.height() < pos.y() )
- pos.ry() -= size.height();
-
- menu->popup(pos);
+ menu->popup(QCursor::pos());
}
bool Klipper::loadHistory() {