mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
oops, need to XFreeColor.
This commit is contained in:
parent
de2788c4cc
commit
b050687720
@ -638,6 +638,7 @@ setup_gc() {
|
|||||||
|
|
||||||
Colormap colormap = DefaultColormap(_display, _screen);
|
Colormap colormap = DefaultColormap(_display, _screen);
|
||||||
if (XAllocColor(_display, colormap, &blue)) {
|
if (XAllocColor(_display, colormap, &blue)) {
|
||||||
|
_blue_pixel = blue.pixel;
|
||||||
gcval.foreground = blue.pixel;
|
gcval.foreground = blue.pixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -667,6 +668,10 @@ close_window() {
|
|||||||
XFreeGC(_display, _bar_context);
|
XFreeGC(_display, _bar_context);
|
||||||
}
|
}
|
||||||
_bar_context = None;
|
_bar_context = None;
|
||||||
|
|
||||||
|
// Also free the color we allocated.
|
||||||
|
Colormap colormap = DefaultColormap(_display, _screen);
|
||||||
|
XFreeColors(_display, colormap, &_blue_pixel, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_graphics_context != None) {
|
if (_graphics_context != None) {
|
||||||
|
@ -81,6 +81,7 @@ private:
|
|||||||
int _screen;
|
int _screen;
|
||||||
GC _graphics_context;
|
GC _graphics_context;
|
||||||
GC _bar_context;
|
GC _bar_context;
|
||||||
|
unsigned long _blue_pixel;
|
||||||
XImage* _image;
|
XImage* _image;
|
||||||
XImage* _resized_image;
|
XImage* _resized_image;
|
||||||
int _image_width, _image_height;
|
int _image_width, _image_height;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user