`get_windows()` returns all root items
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the provided Python reproduction using dpg.get_windows(), dpg.add_window(), and the other root-item constructors to confirm which items are returned. Trace the get_windows() entry point and determine whether its existing behavior should be corrected or documented alongside a separate item-query API; done means the intended result is covered by a regression test.
Written by the indexing model from the issue text.
Description
Windows 10
Python v3.14.3
DearPyGui v2.2.0
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.setup_dearpygui()
dpg.add_window()
dpg.add_theme()
dpg.add_handler_registry()
dpg.add_item_handler_registry()
assert len(dpg.get_windows()) != 4, "too many items"
The issue with fixing this is that it's nice to have a performant option to get all top-level items. It's also behaved like this for...awhile, so maybe it's best to not fix it (although documenting it might be helpful).
Maybe we could make a new function, instead? Something like:
def get_existing_items(item_types: Sequence[int] | None = None) -> list[int]: ...
...where all items are returned when item_types == None (the current behavior of get_windows()) . Otherwise, only return items of types contained in item_types. Whether we fix it or create a new function, I can work on a PR for it.
- Dominant language
- C++
- Stars
- 15.7k
- Forks
- 790
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hoffstadt/DearPyGui
-
Plot series data silently truncated to float32 when passed as numpy array (should be float64/double)Openstate: pending type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
state: pending type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
state: pending type: improvement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
state: pending type: bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
state: pending type: improvement
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in hoffstadt/DearPyGui
Similar issues
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
bot-triaged module: correctness (silent) module: fft triage review
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
patrickjquinn/Marathon-Shell#84 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day