aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/X11Display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/native/X11Display.c')
-rw-r--r--src/newt/native/X11Display.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/newt/native/X11Display.c b/src/newt/native/X11Display.c
index 8457e4b63..a2fba9b7f 100644
--- a/src/newt/native/X11Display.c
+++ b/src/newt/native/X11Display.c
@@ -1,5 +1,5 @@
/**
- * Copyright 2011 JogAmp Community. All rights reserved.
+ * Copyright 2011-2023 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
@@ -764,11 +764,14 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_DisplayDriver_DispatchMessage
Window winRoot, winTopParent;
Bool translated = False;
if( 0 != NewtWindows_getRootAndParent(dpy, evt.xconfigure.window, &winRoot, &winTopParent) ) {
+ DBG_PRINT( "X11: event . ConfigureNotify call %p (root %p, top %p)\n",
+ (void*)evt.xconfigure.window, (void*)winRoot, (void*)winTopParent);
int x_return=-1, y_return=-1;
+ Window winDest = ( winTopParent == jw->parentWindow ) ? winTopParent : winRoot;
Window child;
- if( True == XTranslateCoordinates(dpy, evt.xconfigure.window, winRoot, 0, 0, &x_return, &y_return, &child) ) {
- DBG_PRINT( "X11: event . ConfigureNotify call %p POS (Xtrans) %d/%d -> %d/%d\n",
- (void*)evt.xconfigure.window, x_pos, y_pos, x_return, y_return);
+ if( True == XTranslateCoordinates(dpy, evt.xconfigure.window, winDest, 0, 0, &x_return, &y_return, &child) ) {
+ DBG_PRINT( "X11: event . ConfigureNotify call %p of dest %p POS (Xtrans) %d/%d -> %d/%d (child %p)\n",
+ (void*)evt.xconfigure.window, winDest, x_pos, y_pos, x_return, y_return, child);
x_pos = x_return;
y_pos = y_return;
translated = True;