Store XClassHint on stack, not in dynamic memory
This commit is contained in:
parent
9f995b7f19
commit
7a404e7fbc
1 changed files with 4 additions and 7 deletions
|
@ -79,14 +79,11 @@ FbRun::FbRun(int x, int y, size_t width):
|
||||||
resize(width, font().height() + m_bevel);
|
resize(width, font().height() + m_bevel);
|
||||||
|
|
||||||
// setup class name
|
// setup class name
|
||||||
XClassHint *class_hint = XAllocClassHint();
|
XClassHint ch;
|
||||||
if (class_hint == 0)
|
ch.res_name = const_cast<char *>("fbrun");
|
||||||
throw string("Out of memory");
|
ch.res_class = const_cast<char *>("FbRun");
|
||||||
class_hint->res_name = const_cast<char *>("fbrun");
|
XSetClassHint(m_display, window(), &ch);
|
||||||
class_hint->res_class = const_cast<char *>("FbRun");
|
|
||||||
XSetClassHint(m_display, window(), class_hint);
|
|
||||||
|
|
||||||
XFree(class_hint);
|
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
Pixmap mask = 0;
|
Pixmap mask = 0;
|
||||||
Pixmap pm;
|
Pixmap pm;
|
||||||
|
|
Loading…
Reference in a new issue