hoffstadt / hoffstadt/DearPyGui
get_viewport_pos() sometimes returns [0, 0]
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 1.9.0
Operating System: Fedora 36 64-bit
## My Issue/Question
`get_viewport_pos()` sometimes returns [0, 0] even if that's not true.
## To Reproduce
Steps to reproduce the behavior:
1. Run `https://github.com/my1e5/dpg-examples/blob/main/window/drag_menu_bar.py`
2. Optionally, add `print(viewport_pos_x, viewport_pos_y)` under line 11
3. Attempt to drag the menu bar and watch the viewport flicker between its supposed position and the top left of the screen
## Expected behavior
`get_viewport_pos()` should consistently return its actual value.
## Screenshots/Video
https://user-images.githubusercontent.com/50395934/234825549-5dce2366-c57c-4ba1-90ff-dba0a8866c5a.mp4

(Sample console output with the addition of the print statement)
## Standalone, minimal, complete and verifiable example
`https://github.com/my1e5/dpg-examples/blob/main/window/drag_menu_bar.py`
Contributor guide
Assessment
This issue has not been assessed yet.