From 7d48b20652ebfba355ab6228dce285f92a805e97 Mon Sep 17 00:00:00 2001 From: "Julien \"_FrnchFrgg_\" RIVAUD" Date: Thu, 31 Oct 2019 10:26:06 +0100 Subject: [PATCH] Fix a thinko in x position of menu popups This has lasted without being noticed because menus that big are not common. --- libs/gtkmm2ext/utils.cc | 4 ++-- 1 file 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 {