summaryrefslogtreecommitdiff
path: root/src/Fl_Menu.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-01-22 20:58:48 +0100
committerMatthias Melcher <github@matthiasm.com>2024-01-22 20:58:48 +0100
commit7b01f0b39fc08c26af00eceddcd0ee6998d50504 (patch)
tree614834e11876fcae7a32ad397c72fe9d4c83d954 /src/Fl_Menu.cxx
parent595d2df049599890ea0a0cc3aa1d23e6388ed883 (diff)
Fixes mouse pointer visibility for popups (#890)
Diffstat (limited to 'src/Fl_Menu.cxx')
-rw-r--r--src/Fl_Menu.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 4aae40ecf..4e17ec534 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -969,10 +969,14 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown(
Y += Fl::event_y_root()-Fl::event_y();
menuwindow::parent_ = Fl::first_window();
}
+
int XX, YY, WW;
Fl::screen_xywh(XX, YY, WW, menuwindow::display_height_, menuwindow::parent_->screen_num());
menuwindow mw(this, X, Y, W, H, initial_item, title, menubar);
Fl::grab(mw);
+ // If we grab the mouse pointer, we should also make sure that it is visible.
+ if (menuwindow::parent_)
+ menuwindow::parent_->cursor(FL_CURSOR_DEFAULT);
menustate pp; p = &pp;
pp.p[0] = &mw;
pp.nummenus = 1;