mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Free used X11 resources colormap, pixmap, cursor.
This commit is contained in:
parent
15583a79c4
commit
8b0d8d8446
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Free used X11 resources colormap, pixmap, cursor.
|
||||||
Fix bug: spelling USE_VAPI wrong, missing functions.
|
Fix bug: spelling USE_VAPI wrong, missing functions.
|
||||||
|
|
||||||
User johns
|
User johns
|
||||||
|
15
video.c
15
video.c
@ -286,6 +286,7 @@ static xcb_colormap_t VideoColormap; ///< video colormap
|
|||||||
static xcb_window_t VideoWindow; ///< video window
|
static xcb_window_t VideoWindow; ///< video window
|
||||||
static xcb_screen_t const *VideoScreen; ///< video screen
|
static xcb_screen_t const *VideoScreen; ///< video screen
|
||||||
static uint32_t VideoBlankTick; ///< blank cursor timer
|
static uint32_t VideoBlankTick; ///< blank cursor timer
|
||||||
|
static xcb_pixmap_t VideoCursorPixmap; ///< blank curosr pixmap
|
||||||
static xcb_cursor_t VideoBlankCursor; ///< empty invisible cursor
|
static xcb_cursor_t VideoBlankCursor; ///< empty invisible cursor
|
||||||
|
|
||||||
static int VideoWindowX; ///< video output window x coordinate
|
static int VideoWindowX; ///< video output window x coordinate
|
||||||
@ -9917,9 +9918,9 @@ static void VideoCreateWindow(xcb_window_t parent, xcb_visualid_t visual,
|
|||||||
values[0] = cursor;
|
values[0] = cursor;
|
||||||
xcb_change_window_attributes(Connection, VideoWindow, XCB_CW_CURSOR,
|
xcb_change_window_attributes(Connection, VideoWindow, XCB_CW_CURSOR,
|
||||||
values);
|
values);
|
||||||
|
VideoCursorPixmap = pixmap;
|
||||||
VideoBlankCursor = cursor;
|
VideoBlankCursor = cursor;
|
||||||
VideoBlankTick = 0;
|
VideoBlankTick = 0;
|
||||||
// FIXME: free cursor/pixmap needed?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -10448,6 +10449,18 @@ void VideoExit(void)
|
|||||||
xcb_destroy_window(Connection, VideoWindow);
|
xcb_destroy_window(Connection, VideoWindow);
|
||||||
VideoWindow = XCB_NONE;
|
VideoWindow = XCB_NONE;
|
||||||
}
|
}
|
||||||
|
if (VideoColormap != XCB_NONE) {
|
||||||
|
xcb_free_colormap(Connection, VideoColormap);
|
||||||
|
VideoColormap = XCB_NONE;
|
||||||
|
}
|
||||||
|
if (VideoBlankCursor != XCB_NONE) {
|
||||||
|
xcb_free_cursor(Connection, VideoBlankCursor);
|
||||||
|
VideoBlankCursor = XCB_NONE;
|
||||||
|
}
|
||||||
|
if (VideoCursorPixmap != XCB_NONE) {
|
||||||
|
xcb_free_pixmap(Connection, VideoCursorPixmap);
|
||||||
|
VideoCursorPixmap = XCB_NONE;
|
||||||
|
}
|
||||||
if (XlibDisplay) {
|
if (XlibDisplay) {
|
||||||
if (XCloseDisplay(XlibDisplay)) {
|
if (XCloseDisplay(XlibDisplay)) {
|
||||||
Error(_("video: error closing display\n"));
|
Error(_("video: error closing display\n"));
|
||||||
|
Loading…
Reference in New Issue
Block a user