- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 23.5k
 
Description
Tested versions
Reproducible in 4.5 and 4.6dev2.
System information
MacOS 14.7.5
Issue description
I'm working on fixing PopupMenu issues with submenus, and had some difficulty in figuring out the source of apparently random menu item flickering, which is impeding my wrapping things up.
The source of the problem is errant notifications of NOTIFICATION_WM_MOUSE_ENTER and NOTIFICATION_WM_MOUSE_EXIT that only occurs after the first click on any menu item, disabled or not. Prior to that click the notifications work correctly. I suspect this is an issue with DisplayServer or possibly Window.
In the screen recording below, you can see the correct behavior until I go up and click the disabled menu item. Thereafter, a constant stream of enter/exits begins. It goes away after closing and reopening the menu.
Screen.Recording.2025-11-03.at.3.34.29.PM.mov
Steps to reproduce
Add the following print lines to popup_menu.cpp, then open any pulldown menu in the Editor and click any item (including any disabled item). Moving the mouse around the menu will trigger constant notifications of entering and exiting. Notice that prior to clicking an item, it works as expected with the notification being send only upon actually entering and exiting the popup.
		case NOTIFICATION_WM_MOUSE_ENTER: {
			print_line("NOTIFICATION_WM_MOUSE_ENTER", OS::get_singleton()->get_ticks_msec());
			grab_focus();
		} break;
		case NOTIFICATION_WM_MOUSE_EXIT: {
			print_line("NOTIFICATION_WM_MOUSE_EXIT", OS::get_singleton()->get_ticks_msec());
			if (mouse_over >= 0 && (!items[mouse_over].submenu || submenu_over != -1)) {
				mouse_over = -1;
				queue_accessibility_update();
				control->queue_redraw();
			}
		} break;
Minimal reproduction project (MRP)
See above.