I used XReparentWindow() to embed the video window inside the other top-level window. Though the video plays at the position expected, a shadow window still appears at the top left corner of the root window and the taskbar button for this window is seen on the taskbar(root window).
Why do the shadow and taskbar button appear on the root window? How to remove the shadow? As you may guess, I am new to X-programming.
Please help.
I am showing below the main flow of the code used.
extern Window g_wnd; // top-level Rdesktop window
extern int g_width; // Rdesktop window width
extern int g_height; // Rdesktop window height
{
SDL_Surface *screen;
SMPEG *mpeg;
Window sdlwin;
g_display = XOpenDisplay(NULL);
// Initialize SDL
...
// Create the MPEG stream
if((fd = tcp_open(client_addr, client_port)) != 0)
mpeg = SMPEG_new_descr(fd, &info, use_audio);
screen = SDL_SetVideoMode(width, height, video_bpp, video_flags);
sdlwin = GetSDLWindow();
// Embed the video window inside TS window
XReparentWindow(g_display, sdlwin, g_wnd,
(g_width - width) / 2,
(g_height - height) / 2);
SMPEG_setdisplay(mpeg, screen, NULL, update);
SMPEG_scaleXY(mpeg, screen->w, screen->h);
SMPEG_play(mpeg);
// event loop
...
}
|