summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2019-10-31 10:26:06 +0100
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2019-10-31 10:29:43 +0100
commit7d48b20652ebfba355ab6228dce285f92a805e97 (patch)
tree31a927ded356c60513fe198252213e3a5b0c47ac /libs/gtkmm2ext
parent5e4d641488cbad185a6f1fd9d3b8158b7de994f2 (diff)
Fix a thinko in x position of menu popups
This has lasted without being noticed because menus that big are not common.
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/utils.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc
index c3620bbba4..6f2a177372 100644
--- a/libs/gtkmm2ext/utils.cc
+++ b/libs/gtkmm2ext/utils.cc
@@ -365,7 +365,7 @@ _position_menu_anchored (int& x, int& y, bool& push_in,
x += allocation.get_width() - menu_req.width;
} else if (x + menu_req.width <= monitor.get_x() + monitor.get_width()) {
/* b) align menu left and button left: nothing to do*/
- } else if (menu_req.width > monitor.get_width()) {
+ } else if (menu_req.width <= monitor.get_width()) {
/* c) align menu left and screen left, guaranteed to fit */
x = monitor.get_x();
} else {
@@ -378,7 +378,7 @@ _position_menu_anchored (int& x, int& y, bool& push_in,
} else if (monitor.get_x() <= x + allocation.get_width() - menu_req.width) {
/* b) align menu right and button right */
x += allocation.get_width() - menu_req.width;
- } else if (menu_req.width > monitor.get_width()) {
+ } else if (menu_req.width <= monitor.get_width()) {
/* c) align menu right and screen right, guaranteed to fit */
x = monitor.get_x() + monitor.get_width() - menu_req.width;
} else {