gtk_window_get_position returns always (0, 0) in X11 mode
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.9k
- Forks
- 429
- PR merge metrics
- No merged PRs in 30d
Description
Environment
Microsoft Windows [Version 10.0.22000.65]
Release: 20.04

Steps to reproduce
Calls to gtk_window_get_position(GTK_WINDOW(_window), x, y); always return 0, 0 in WSLg, but return proper values on a Linux machine. I'm not sure if this is by design, not working properly or if there is a different method for retrieving this info in WSLg.
Expected behavior
I would expect x and y coordinates appropriate for the display to be returned.
Actual behavior
Always return 0, 0.
Contributor 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.
Research direction
Start by reproducing gtk_window_get_position(GTK_WINDOW(_window), x, y) in WSLg's X11 mode and compare the result with a Linux machine, using the reported environment and steps. Investigate whether returning (0, 0) is expected or a WSLg defect; done means the behavior is explained and coordinates appropriate for the display are returned or documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100