The reference point of a window should include the window decorations but it does not.
- Dominant language
- C
- Stars
- 10.6k
- Forks
- 822
- PR merge metrics
- No merged PRs in 30d
Description
### Welcome
- [X] Yes, I'm using the latest major release or the current development version. These are the only supported versions.
- [x] Yes, I've searched similar issues and discussions on GitHub and didn't find any.
### Current Behavior
When moving a window to 0,0 I get this:

### Expected Behavior

### Reproduction Instructions
Assuming that you are not using a dual monitor setup (0,0 actually being the topleft) this will create a window with gtk and move it to 0,0
```C
#include
int main(int argc, char** argv) {
gtk_init(&argc, &argv);
GtkWidget* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_UTILITY);
GtkWidget* label = gtk_label_new ("This is my label");
gtk_container_add (GTK_CONTAINER (window), label);
gtk_widget_show_all (window);
gtk_window_move (GTK_WINDOW (window), 0,0);
gtk_main();
return 0;
}
```
This behavior, deciding on the reference point of the window should be controlled with gravity[1]. So implementing gravities could solve this problem.
[1]: https://docs.gtk.org/gdk3/enum.Gravity.html
With no proper/easy way to get the size of the window decorations, this bug makes it extremely hard to place a window at an exact offset from the screen borders.
I think this is a duplicate of https://github.com/i3/i3/issues/1341 but you wanted me to file a new bug report.
That issue was closed with https://github.com/i3/i3/pull/3184, but I think the bug has resurfaced or the PR didn't fix the issue.
### i3 version
```text
Binary i3 version: 4.23 (2023-10-29) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.23 (2023-10-29) (pid 14541)
Loaded i3 config:
/home/rein/.config/i3/config (main) (last modified: Wed 03 Jan 2024 12:59:17 AM CET, 6288274 seconds ago)
The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
```
### Config file
```text
This happens with default configuration.
```
### Linux distribution & Version
ArchLinux
### Are you using a compositor?
picom
### Logfile
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.