aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun
diff options
context:
space:
mode:
authorVladimir A. Pavlov <pv4@bk.ru>2012-10-22 15:28:35 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-12-30 11:27:37 (GMT)
commit7a404e7fbca7894cdda76f7b0ddfed855a732424 (patch)
treec06c88c8730a756a9bc3b7b32a05d2f6cd8e910b /util/fbrun
parent9f995b7f1974eabfe09b029f890059e689ec1397 (diff)
downloadfluxbox-7a404e7fbca7894cdda76f7b0ddfed855a732424.zip
fluxbox-7a404e7fbca7894cdda76f7b0ddfed855a732424.tar.bz2
Store XClassHint on stack, not in dynamic memory
Diffstat (limited to 'util/fbrun')
-rw-r--r--util/fbrun/FbRun.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 9ed3186..fac09b9 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -79,14 +79,11 @@ FbRun::FbRun(int x, int y, size_t width):
79 resize(width, font().height() + m_bevel); 79 resize(width, font().height() + m_bevel);
80 80
81 // setup class name 81 // setup class name
82 XClassHint *class_hint = XAllocClassHint(); 82 XClassHint ch;
83 if (class_hint == 0) 83 ch.res_name = const_cast<char *>("fbrun");
84 throw string("Out of memory"); 84 ch.res_class = const_cast<char *>("FbRun");
85 class_hint->res_name = const_cast<char *>("fbrun"); 85 XSetClassHint(m_display, window(), &ch);
86 class_hint->res_class = const_cast<char *>("FbRun"); 86
87 XSetClassHint(m_display, window(), class_hint);
88
89 XFree(class_hint);
90#ifdef HAVE_XPM 87#ifdef HAVE_XPM
91 Pixmap mask = 0; 88 Pixmap mask = 0;
92 Pixmap pm; 89 Pixmap pm;