Grab parent pointer in Fullscreen X11

*nix specific usage questions
coldfire
Blank Cone
Blank Cone
Posts: 47
Joined: 07 Jul 2008 11:02

Grab parent pointer in Fullscreen X11

Postby coldfire » 07 Aug 2008 18:45

Hy,

i am in a situation, when I play the video (under ubuntu) from FF plugin in fullscreen mode (X code will be called). I get the pointer to the fullscreen window which is apparently the subwindow created after function call "CreateWindow()" in xcommon.c

I want to grab the parent of this video window, whenever I do XQueryTree() to get the childList of this window's parent, I get the segfault.

Is there anyway to get the handle on firefox window when video is in fullscreen mode.


Thanks
Good one What is H264?

coldfire
Blank Cone
Blank Cone
Posts: 47
Joined: 07 Jul 2008 11:02

Re: Grab parent pointer in Fullscreen X11

Postby coldfire » 07 Aug 2008 22:38

What I need is to get the Window Id of the browser in case of playing vlc as plugin OR the window id of vlc-player in case I am playing video as in normal player. The code to get the IDs (root,children,parent) depends on the location of function call XQueryTree()....I dont know where I can get the appropriate information ....i am rightnow calling this in ToggleFullScreen where I am getting a BadWindow error ...that obviously means the window after going into fullscreen maybe loses its parent window-id....but i am not sure yet....
Is there any other way I can get the WindowId of the parent of fullscreen video window ???

any feedback would be appreciated.

//xcommon.c
static void ToggleFullScreen ( vout_thread_t *p_vout )
{
Atom prop;
XEvent xevent;
mwmhints_t mwmhints;
XSetWindowAttributes attributes;

#ifdef HAVE_XINERAMA
int i_d1, i_d2;
#endif
p_vout->b_fullscreen = !p_vout->b_fullscreen;
if( p_vout->b_fullscreen )
{
...............
...............
............... //finishes making fullscreen
Window parent;
Window root;
Window *child_list;
unsigned int num_children;
Window child;
int i;
Display * dpy = p_vout->p_sys->p_display;
XGetInputFocus(dpy, &child, &i);
XQueryTree(dpy, child, &root, &parent, &child_list, &num_children); //BADWINDOW
if(parent==root)
return child;
while(parent!=root)
{
child = parent;
if (!XQueryTree(dpy, child, &root, &parent, &child_list,
&num_children))
printf("Can't query window tree.");
}
}else{
}
Good one What is H264?

coldfire
Blank Cone
Blank Cone
Posts: 47
Joined: 07 Jul 2008 11:02

Re: Grab parent pointer in Fullscreen X11

Postby coldfire » 11 Aug 2008 09:57

i want the video player window to appear on top of Fullscreen video. How can I do that ??
Good one What is H264?


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 16 guests