diff options
| author | Johns <johns98@gmx.net> | 2012-07-21 15:07:48 +0200 |
|---|---|---|
| committer | Johns <johns98@gmx.net> | 2012-07-21 15:07:48 +0200 |
| commit | 9428376c613e7dfba6541df413d31d1df1ad0a9a (patch) | |
| tree | d0b442cadf715457793d43bae6afddc8c6314fd9 | |
| parent | f336e4a7d1fca9375bfe892818452671e7245f83 (diff) | |
| download | vdr-plugin-play-9428376c613e7dfba6541df413d31d1df1ad0a9a.tar.gz vdr-plugin-play-9428376c613e7dfba6541df413d31d1df1ad0a9a.tar.bz2 | |
Guard poll. Map only video window.
| -rw-r--r-- | video.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -148,8 +148,6 @@ static xcb_window_t VideoCreateWindow(xcb_window_t parent, xcb_configure_window(Connection, window, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values); - xcb_map_window(Connection, window); - return window; } @@ -467,6 +465,11 @@ void VideoPollEvents(int timeout) int n; int delay; + if (!Connection) { + Debug(3, "play: poll without connection\n"); + return; + } + fds[0].fd = xcb_get_file_descriptor(Connection); fds[0].events = POLLIN | POLLPRI; @@ -633,6 +636,7 @@ int VideoInit(const char *display) VideoPlayWindow = VideoCreateWindow(VideoScreen->root, VideoScreen->root_visual, VideoScreen->root_depth); + xcb_map_window(Connection, VideoPlayWindow); VideoOsdWindow = VideoCreateWindow(VideoPlayWindow, VideoScreen->root_visual, VideoScreen->root_depth); |
