aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-12 16:13:32 -0400
committerDavid Robillard <d@drobilla.net>2023-05-12 17:08:10 -0400
commit8f6149b04b6e373987b9fac40673fc98d028998a (patch)
tree6bd8d0138dac24f00abee3c966047cf9ddc99188
parent4cdb95b63f4e357321765c1418ade7f4e9bc0ed3 (diff)
downloadpugl-8f6149b04b6e373987b9fac40673fc98d028998a.tar.gz
pugl-8f6149b04b6e373987b9fac40673fc98d028998a.tar.bz2
pugl-8f6149b04b6e373987b9fac40673fc98d028998a.zip
X11: Use the root provided by XGetWindowAttributes()
-rw-r--r--src/x11.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/x11.c b/src/x11.c
index a5b0389..e4c0aab 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -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}};