[X2Go-Commits] [nx-libs] 125/219: Screen.c: add nxagentIsParentOf helper
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 28 12:10:35 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit d32706888f83b91d6feab93067d1207c507335fa
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Wed Jun 26 18:50:44 2019 +0200
Screen.c: add nxagentIsParentOf helper
---
nx-X11/programs/Xserver/hw/nxagent/Screen.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 6ec4b245f..4e466b502 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -297,6 +297,28 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
}
}
+/* check if possible_parent is parent of candidate */
+Bool nxagentIsParentOf(Display *d, Window possible_parent, Window candidate)
+{
+ Window parent, root, *children = NULL;
+ unsigned int num_children;
+
+ if (XQueryTree(d, candidate, &root, &parent, &children, &num_children))
+ {
+ if (children)
+ XFree((char *)children);
+
+ #ifdef TEST
+ fprintf(stderr, "%s: parent of full screen window [%p] root [%p] possible_parent [%p] candidate [%p]\n", __func__, parent, root, possible_parent, candidate);
+ #endif
+ return (parent == possible_parent);
+ }
+ else
+ {
+ return False;
+ }
+}
+
void nxagentMinimizeFromFullScreen(ScreenPtr pScreen)
{
XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow);
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list