diff options
author | David Robillard <d@drobilla.net> | 2023-05-12 16:13:32 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-12 17:08:10 -0400 |
commit | 8f6149b04b6e373987b9fac40673fc98d028998a (patch) | |
tree | 6bd8d0138dac24f00abee3c966047cf9ddc99188 | |
parent | 4cdb95b63f4e357321765c1418ade7f4e9bc0ed3 (diff) | |
download | pugl-8f6149b04b6e373987b9fac40673fc98d028998a.tar.gz pugl-8f6149b04b6e373987b9fac40673fc98d028998a.tar.bz2 pugl-8f6149b04b6e373987b9fac40673fc98d028998a.zip |
X11: Use the root provided by XGetWindowAttributes()
-rw-r--r-- | src/x11.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1066,12 +1066,11 @@ getCurrentConfiguration(PuglView* const view) XGetWindowAttributes(display, view->impl->win, &attrs); // Get window position relative to the root window - const Window root = RootWindow(display, view->impl->screen); - Window ignoredChild = 0; - int rootX = 0; - int rootY = 0; + Window ignoredChild = 0; + int rootX = 0; + int rootY = 0; XTranslateCoordinates( - display, view->impl->win, root, 0, 0, &rootX, &rootY, &ignoredChild); + display, view->impl->win, attrs.root, 0, 0, &rootX, &rootY, &ignoredChild); // Build a configure event based on the current window configuration PuglEvent configureEvent = {{PUGL_CONFIGURE, 0}}; |