summaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authorMartin Minarik <minarik11@student.fiit.stuba.sk>2012-06-07 18:01:59 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-06-08 13:11:36 -0400
commit6d11836721a2cd2ad954d2b09ea4433b0c354006 (patch)
treefa9de504aeae7ac6c07beb3f6d1efe2a2902e173 /src/shell.c
parent19e6f2693d09f9d9df03df3b404b54516783560e (diff)
Replace fprintf() by weston_log()
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/shell.c b/src/shell.c
index 879433c..73af751 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -36,6 +36,7 @@
#include "compositor.h"
#include "desktop-shell-server-protocol.h"
#include "../shared/config-parser.h"
+#include "log.h"
enum animation_type {
ANIMATION_NONE,
@@ -975,7 +976,7 @@ create_black_surface(struct weston_compositor *ec,
surface = weston_surface_create(ec);
if (surface == NULL) {
- fprintf(stderr, "no memory\n");
+ weston_log("no memory\n");
return NULL;
}
@@ -1316,13 +1317,13 @@ create_shell_surface(void *shell, struct weston_surface *surface,
struct shell_surface *shsurf;
if (surface->configure) {
- fprintf(stderr, "surface->configure already set\n");
+ weston_log("surface->configure already set\n");
return NULL;
}
shsurf = calloc(1, sizeof *shsurf);
if (!shsurf) {
- fprintf(stderr, "no memory to allocate shell surface\n");
+ weston_log("no memory to allocate shell surface\n");
return NULL;
}
@@ -1415,7 +1416,7 @@ launch_screensaver(struct desktop_shell *shell)
return;
if (shell->screensaver.process.pid != 0) {
- fprintf(stderr, "old screensaver still running\n");
+ weston_log("old screensaver still running\n");
return;
}
@@ -1498,7 +1499,7 @@ handle_lock_surface_destroy(struct wl_listener *listener, void *data)
struct desktop_shell *shell =
container_of(listener, struct desktop_shell, lock_surface_listener);
- fprintf(stderr, "lock surface gone\n");
+ weston_log("lock surface gone\n");
shell->lock_surface = NULL;
}
@@ -2327,11 +2328,11 @@ desktop_shell_sigchld(struct weston_process *process, int status)
shell->child.deathcount++;
if (shell->child.deathcount > 5) {
- fprintf(stderr, "weston-desktop-shell died, giving up.\n");
+ weston_log("weston-desktop-shell died, giving up.\n");
return;
}
- fprintf(stderr, "weston-desktop-shell died, respawning...\n");
+ weston_log("weston-desktop-shell died, respawning...\n");
launch_desktop_shell_process(shell);
}