godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.67k stars 20.11k forks source link

Linking a PopupMenu to a StatusIndicator forces the PopupMenu to use the Prefer Native Menu option #93623

Open L-the-forgettable opened 2 months ago

L-the-forgettable commented 2 months ago

Tested versions

System information

Windows 10 - v4.3.beta2.official [b75f0485b]

Issue description

When linking a PopupMenu to a StatusIndicator, the PopupMenu is forced to use the "Prefer Native Window" option regardless of how the PopupMenu was triggered

Steps to reproduce

  1. Create PopupMenu and StatusIndicator nodes
  2. Link PopupMenu to StatusIndicator node
  3. Add an item to the item list
  4. Trigger the PopupMenu outside of the StatusIndicator node (e.g. with .popup())

Minimal reproduction project (MRP)

bug-report.zip I've included this project in two other bug reports I've posted recently - If you're coming from/going to one of the other two this is a part of, rest assured you don't need to redownload the project for each report. They are the exact same file.

akien-mga commented 2 months ago

CC @bruvzg

bruvzg commented 2 months ago

The same is true also for children of MenuBar, or nested PopupMenus. I'm not sure if anything should be done with it (except adding a note in the documentation and adding is_native_menu method to check actual status, like MenuBar has), these are cases when menu must be native regardless of settings, and it can't be both native and non-native at the same time.

L-the-forgettable commented 2 months ago

Yeah, something in the documentation would be nice, for all 3 of these even as I had no idea this was intended behavior.