summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2019-10-31 11:34:36 +0100
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2019-10-31 11:34:36 +0100
commit07458155a290ea719dca70b876eb0922e755f7a3 (patch)
treece86e13cd0f751c46aa3d79f42e1c6e200bb8cf4 /libs/gtkmm2ext
parenteaba4fa593efd2f192a777654dcf7a03fd3f0ff8 (diff)
Work around an initialization bug of GTK menus
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/utils.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc
index 8c03d20c33..64a8eacf05 100644
--- a/libs/gtkmm2ext/utils.cc
+++ b/libs/gtkmm2ext/utils.cc
@@ -317,7 +317,7 @@ Gtkmm2ext::pixbuf_from_string(const string& name, const Pango::FontDescription&
static void
_position_menu_anchored (int& x, int& y, bool& push_in,
- const Gtk::Menu* const menu,
+ Gtk::Menu* const menu,
Gtk::Widget* const anchor,
const std::string& selected)
{
@@ -424,10 +424,13 @@ _position_menu_anchored (int& x, int& y, bool& push_in,
y -= menu_req.height; /* c) */
} else if (i != items.end()) {
y -= offset; /* d) */
+ menu->gobj()->upper_arrow_visible = 1; /* work around a gtk bug for the first show */
} else if (monitor.get_height() - allocation.get_height() >= 2*(y - monitor.get_y())) {
y += allocation.get_height(); /* e), more space below */
+ menu->gobj()->upper_arrow_visible = 1; /* work around a gtk bug for the first show */
} else {
y -= menu_req.height; /* e), more space above */
+ menu->gobj()->upper_arrow_visible = 1; /* work around a gtk bug for the first show */
}
push_in = true;