aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-17 23:34:37 +0000
committerRichard M. Stallman1994-06-17 23:34:37 +0000
commit043835a3bafbb260263c9311ad4b3733d39937ef (patch)
treed5f5b2d3f36461a90d243db901ad6f1115650b99 /src
parent46680faf4a7c5ee3ebc4f93886ef340118fb2cfe (diff)
downloademacs-043835a3bafbb260263c9311ad4b3733d39937ef.tar.gz
emacs-043835a3bafbb260263c9311ad4b3733d39937ef.zip
(x_real_positions): Make sure we know the parent window.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 00f0f2055a1..a8bcc81cc51 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -570,6 +570,23 @@ x_real_positions (f, xptr, yptr)
570 int win_x = 0, win_y = 0; 570 int win_x = 0, win_y = 0;
571 Window child; 571 Window child;
572 572
573 /* This is pretty gross, but seems to be the easiest way out of
574 the problem that arises when restarting window-managers. */
575
576#ifdef USE_X_TOOLKIT
577 Window outer = XtWindow (f->display.x->widget);
578#else
579 Window outer = f->display.x->window_desc;
580#endif
581 Window tmp_root_window;
582 Window *tmp_children;
583 int tmp_nchildren;
584
585 XQueryTree (x_current_display, outer, &tmp_root_window,
586 &f->display.x->parent_desc,
587 &tmp_children, &tmp_nchildren);
588 xfree (tmp_children);
589
573 /* Find the position of the outside upper-left corner of 590 /* Find the position of the outside upper-left corner of
574 the inner window, with respect to the outer window. */ 591 the inner window, with respect to the outer window. */
575 if (f->display.x->parent_desc != ROOT_WINDOW) 592 if (f->display.x->parent_desc != ROOT_WINDOW)