microsoft / microsoft/wslg

gtk_window_get_position returns always (0, 0) in X11 mode

Open
#355 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug window-management
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

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.