diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-01-22 20:58:48 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-01-22 20:58:48 +0100 |
| commit | 7b01f0b39fc08c26af00eceddcd0ee6998d50504 (patch) | |
| tree | 614834e11876fcae7a32ad397c72fe9d4c83d954 /src/Fl_Menu.cxx | |
| parent | 595d2df049599890ea0a0cc3aa1d23e6388ed883 (diff) | |
Fixes mouse pointer visibility for popups (#890)
Diffstat (limited to 'src/Fl_Menu.cxx')
| -rw-r--r-- | src/Fl_Menu.cxx | 4 |
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; |
