Fixed logging for examples

This commit is contained in:
Timidger 2018-01-15 22:51:00 -05:00
parent c690420501
commit 264ef0c261
No known key found for this signature in database
GPG key ID: 42EF7ECE5FEF1D17
9 changed files with 11 additions and 0 deletions

View file

@ -7,6 +7,7 @@
#include <wayland-client.h>
#include <wayland-client-protocol.h>
#include <idle-client-protocol.h>
#include <wlr/util/log.h>
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;

View file

@ -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 },

View file

@ -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;

View file

@ -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 },

View file

@ -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);

View file

@ -36,6 +36,7 @@
#include <sys/param.h>
#include <screenshooter-client-protocol.h>
#include "util/os-compatibility.h"
#include <wlr/util/log.h>
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");

View file

@ -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,

View file

@ -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 }

View file

@ -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);