From 264ef0c261db998ada651984136776fd336c4a72 Mon Sep 17 00:00:00 2001 From: Timidger Date: Mon, 15 Jan 2018 22:51:00 -0500 Subject: [PATCH] Fixed logging for examples --- examples/idle.c | 2 ++ examples/multi-pointer.c | 1 + examples/output-layout.c | 1 + examples/pointer.c | 1 + examples/rotation.c | 1 + examples/screenshot.c | 2 ++ examples/simple.c | 1 + examples/tablet.c | 1 + examples/touch.c | 1 + 9 files changed, 11 insertions(+) diff --git a/examples/idle.c b/examples/idle.c index e5e01f638..57c366d16 100644 --- a/examples/idle.c +++ b/examples/idle.c @@ -7,6 +7,7 @@ #include #include #include +#include static struct org_kde_kwin_idle *idle_manager = NULL; static struct wl_seat *seat = NULL; @@ -108,6 +109,7 @@ void *main_loop(void *data) { } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); if (parse_args(argc, argv) != 0) { return -1; diff --git a/examples/multi-pointer.c b/examples/multi-pointer.c index 3f8b2415f..62aa1bace 100644 --- a/examples/multi-pointer.c +++ b/examples/multi-pointer.c @@ -176,6 +176,7 @@ static void handle_input_remove(struct compositor_state *state, } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct sample_state state = { .default_color = { 0.25f, 0.25f, 0.25f, 1 }, .clear_color = { 0.25f, 0.25f, 0.25f, 1 }, diff --git a/examples/output-layout.c b/examples/output-layout.c index d93258386..35ed22a85 100644 --- a/examples/output-layout.c +++ b/examples/output-layout.c @@ -181,6 +181,7 @@ static void handle_keyboard_key(struct keyboard_state *kbstate, } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct sample_state state = {0}; state.x_vel = 500; diff --git a/examples/pointer.c b/examples/pointer.c index 280372e01..9894e3111 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -257,6 +257,7 @@ static void handle_tablet_tool_axis(struct wl_listener *listener, void *data) { } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct sample_state state = { .default_color = { 0.25f, 0.25f, 0.25f, 1 }, .clear_color = { 0.25f, 0.25f, 0.25f, 1 }, diff --git a/examples/rotation.c b/examples/rotation.c index f9307ed32..1d9740256 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -123,6 +123,7 @@ static void handle_keyboard_key(struct keyboard_state *kbstate, } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct sample_state state = {0}; state.config = parse_args(argc, argv); diff --git a/examples/screenshot.c b/examples/screenshot.c index 776528056..441d86845 100644 --- a/examples/screenshot.c +++ b/examples/screenshot.c @@ -36,6 +36,7 @@ #include #include #include "util/os-compatibility.h" +#include static struct wl_shm *shm = NULL; static struct orbital_screenshooter *screenshooter = NULL; @@ -242,6 +243,7 @@ static int set_buffer_size(int *width, int *height) { } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct wl_display * display = wl_display_connect(NULL); if (display == NULL) { fprintf(stderr, "failed to create display: %m\n"); diff --git a/examples/simple.c b/examples/simple.c index ad1b07926..95c056c8c 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -44,6 +44,7 @@ void handle_output_frame(struct output_state *output, struct timespec *ts) { } int main() { + wlr_log_init(L_DEBUG, NULL); struct sample_state state = { .color = { 1.0, 0.0, 0.0 }, .dec = 0, diff --git a/examples/tablet.c b/examples/tablet.c index 4eaa204ac..f3cd53399 100644 --- a/examples/tablet.c +++ b/examples/tablet.c @@ -139,6 +139,7 @@ static void handle_pad_button(struct tablet_pad_state *pstate, } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct sample_state state = { .tool_color = { 1, 1, 1, 1 }, .pad_color = { 0.75, 0.75, 0.75, 1.0 } diff --git a/examples/touch.c b/examples/touch.c index f18b5d264..4c1f97b68 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -94,6 +94,7 @@ static void handle_touch_motion(struct touch_state *tstate, int32_t touch_id, } int main(int argc, char *argv[]) { + wlr_log_init(L_DEBUG, NULL); struct sample_state state; wl_list_init(&state.touch_points);