Fixed logging for examples
This commit is contained in:
		
							parent
							
								
									c690420501
								
							
						
					
					
						commit
						264ef0c261
					
				|  | @ -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; | ||||
|  |  | |||
|  | @ -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 }, | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -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 }, | ||||
|  |  | |||
|  | @ -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); | ||||
| 
 | ||||
|  |  | |||
|  | @ -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"); | ||||
|  |  | |||
|  | @ -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, | ||||
|  |  | |||
|  | @ -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 } | ||||
|  |  | |||
|  | @ -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); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue