summaryrefslogtreecommitdiff
path: root/src/add_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/add_window.c')
-rw-r--r--src/add_window.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/add_window.c b/src/add_window.c
index e6bde43..b4189e1 100644
--- a/src/add_window.c
+++ b/src/add_window.c
@@ -170,9 +170,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
/* allocate space for the twm window */
tmp_win = calloc(1, sizeof(TwmWindow));
if (tmp_win == NULL) {
- fprintf(stderr,
- "%s: Unable to allocate memory to manage window ID %lx.\n",
- ProgramName, w);
+ twmWarning("Unable to allocate memory to manage window ID %lx.", w);
return NULL;
}
tmp_win->w = w;
@@ -1304,8 +1302,7 @@ CreateWindowTitlebarButtons(TwmWindow *tmp_win)
if (nb > 0) {
tmp_win->titlebuttons = malloc((size_t) nb * sizeof(TBWindow));
if (!tmp_win->titlebuttons) {
- fprintf(stderr, "%s: unable to allocate %d titlebuttons\n",
- ProgramName, nb);
+ twmWarning("unable to allocate %d titlebuttons", nb);
}
else {
TBWindow *tbw;
@@ -1497,9 +1494,9 @@ FetchWmColormapWindows(TwmWindow *tmp)
malloc(sizeof(Window) * (size_t) (number_cmap_windows + 1));
if (!new_cmap_windows) {
- fprintf(stderr,
- "%s: unable to allocate %d element colormap window array\n",
- ProgramName, number_cmap_windows + 1);
+ twmWarning
+ ("unable to allocate %d element colormap window array",
+ number_cmap_windows + 1);
goto done;
}
new_cmap_windows[0] = tmp->w; /* add to front */