Fix style issues
This commit is contained in:
		
							parent
							
								
									53052b3f6e
								
							
						
					
					
						commit
						f998bb8299
					
				|  | @ -66,7 +66,7 @@ static struct wlr_output_impl output_impl = { | ||||||
| 	.swap_buffers = wlr_wl_output_swap_buffers, | 	.swap_buffers = wlr_wl_output_swap_buffers, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| void handle_ping(void* data, struct wl_shell_surface* ssurface, uint32_t serial) { | void handle_ping(void *data, struct wl_shell_surface *ssurface, uint32_t serial) { | ||||||
| 	struct wlr_wl_backend_output *output = data; | 	struct wlr_wl_backend_output *output = data; | ||||||
| 	assert(output && output->shell_surface == ssurface); | 	assert(output && output->shell_surface == ssurface); | ||||||
| 	wl_shell_surface_pong(ssurface, serial); | 	wl_shell_surface_pong(ssurface, serial); | ||||||
|  |  | ||||||
|  | @ -19,7 +19,7 @@ static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer, | ||||||
| 	struct wlr_wl_input_device *wlr_wl_dev = (struct wlr_wl_input_device *)dev; | 	struct wlr_wl_input_device *wlr_wl_dev = (struct wlr_wl_input_device *)dev; | ||||||
| 	assert(dev && dev->pointer); | 	assert(dev && dev->pointer); | ||||||
| 	struct wlr_wl_pointer *wlr_wl_pointer = (struct wlr_wl_pointer *)dev->pointer; | 	struct wlr_wl_pointer *wlr_wl_pointer = (struct wlr_wl_pointer *)dev->pointer; | ||||||
| 	struct wlr_wl_backend_output* output = | 	struct wlr_wl_backend_output *output = | ||||||
| 		wlr_wl_output_for_surface(wlr_wl_dev->backend, surface); | 		wlr_wl_output_for_surface(wlr_wl_dev->backend, surface); | ||||||
| 	assert(output); | 	assert(output); | ||||||
| 	wlr_wl_pointer->current_output = output; | 	wlr_wl_pointer->current_output = output; | ||||||
|  |  | ||||||
|  | @ -3,8 +3,10 @@ | ||||||
| 
 | 
 | ||||||
| struct wl_resource; | struct wl_resource; | ||||||
| 
 | 
 | ||||||
| // Implements the given resource as region.
 | /*
 | ||||||
| // Sets the associated pixman_region32_t as userdata.
 |  * Implements the given resource as region. | ||||||
|  |  * Sets the associated pixman_region32_t as userdata. | ||||||
|  |  */ | ||||||
| void wlr_region_create(struct wl_client *client, struct wl_resource *res, | void wlr_region_create(struct wl_client *client, struct wl_resource *res, | ||||||
| 		uint32_t id); | 		uint32_t id); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ typedef struct { | ||||||
| 
 | 
 | ||||||
| list_t *list_create(void); | list_t *list_create(void); | ||||||
| void list_free(list_t *list); | void list_free(list_t *list); | ||||||
| void list_foreach(list_t *list, void (*callback)(void* item)); | void list_foreach(list_t *list, void (*callback)(void *item)); | ||||||
| void list_add(list_t *list, void *item); | void list_add(list_t *list, void *item); | ||||||
| void list_push(list_t *list, void *item); | void list_push(list_t *list, void *item); | ||||||
| void list_insert(list_t *list, size_t index, void *item); | void list_insert(list_t *list, size_t index, void *item); | ||||||
|  |  | ||||||
|  | @ -101,8 +101,9 @@ error: | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void init_image_ext() { | static void init_image_ext() { | ||||||
| 	if (glEGLImageTargetTexture2DOES) | 	if (glEGLImageTargetTexture2DOES) { | ||||||
| 		return; | 		return; | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	const char *exts = (const char*) glGetString(GL_EXTENSIONS); | 	const char *exts = (const char*) glGetString(GL_EXTENSIONS); | ||||||
| 	if (strstr(exts, "GL_OES_EGL_image_external")) { | 	if (strstr(exts, "GL_OES_EGL_image_external")) { | ||||||
|  | @ -177,7 +178,7 @@ static void draw_quad() { | ||||||
| 
 | 
 | ||||||
| static bool wlr_gles2_render_texture(struct wlr_renderer *_renderer, | static bool wlr_gles2_render_texture(struct wlr_renderer *_renderer, | ||||||
| 		struct wlr_texture *texture, const float (*matrix)[16]) { | 		struct wlr_texture *texture, const float (*matrix)[16]) { | ||||||
| 	if(!texture || !texture->valid) { | 	if (!texture || !texture->valid) { | ||||||
| 		wlr_log(L_ERROR, "attempt to render invalid texture"); | 		wlr_log(L_ERROR, "attempt to render invalid texture"); | ||||||
| 		return false; | 		return false; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -23,7 +23,10 @@ void wlr_input_device_init(struct wlr_input_device *dev, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void wlr_input_device_destroy(struct wlr_input_device *dev) { | void wlr_input_device_destroy(struct wlr_input_device *dev) { | ||||||
| 	if (!dev) return; | 	if (!dev) { | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	if (dev->_device) { | 	if (dev->_device) { | ||||||
| 		switch (dev->type) { | 		switch (dev->type) { | ||||||
| 		case WLR_INPUT_DEVICE_KEYBOARD: | 		case WLR_INPUT_DEVICE_KEYBOARD: | ||||||
|  |  | ||||||
|  | @ -11,7 +11,10 @@ void wlr_keyboard_init(struct wlr_keyboard *kb, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void wlr_keyboard_destroy(struct wlr_keyboard *kb) { | void wlr_keyboard_destroy(struct wlr_keyboard *kb) { | ||||||
| 	if (!kb) return; | 	if (!kb) { | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	if (kb->impl && kb->impl->destroy) { | 	if (kb->impl && kb->impl->destroy) { | ||||||
| 		kb->impl->destroy(kb); | 		kb->impl->destroy(kb); | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
|  | @ -14,7 +14,10 @@ void wlr_pointer_init(struct wlr_pointer *pointer, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void wlr_pointer_destroy(struct wlr_pointer *pointer) { | void wlr_pointer_destroy(struct wlr_pointer *pointer) { | ||||||
| 	if (!pointer) return; | 	if (!pointer) { | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	if (pointer->impl && pointer->impl->destroy) { | 	if (pointer->impl && pointer->impl->destroy) { | ||||||
| 		pointer->impl->destroy(pointer); | 		pointer->impl->destroy(pointer); | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
|  | @ -13,7 +13,10 @@ void wlr_tablet_pad_init(struct wlr_tablet_pad *pad, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) { | void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) { | ||||||
| 	if (!pad) return; | 	if (!pad) { | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	if (pad->impl && pad->impl->destroy) { | 	if (pad->impl && pad->impl->destroy) { | ||||||
| 		pad->impl->destroy(pad); | 		pad->impl->destroy(pad); | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
|  | @ -14,7 +14,10 @@ void wlr_touch_init(struct wlr_touch *touch, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void wlr_touch_destroy(struct wlr_touch *touch) { | void wlr_touch_destroy(struct wlr_touch *touch) { | ||||||
| 	if (!touch) return; | 	if (!touch) { | ||||||
|  | 		return; | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
| 	if (touch->impl && touch->impl->destroy) { | 	if (touch->impl && touch->impl->destroy) { | ||||||
| 		touch->impl->destroy(touch); | 		touch->impl->destroy(touch); | ||||||
| 	} else { | 	} else { | ||||||
|  |  | ||||||
|  | @ -74,7 +74,7 @@ void list_cat(list_t *list, list_t *source) { | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void list_qsort(list_t* list, int compare(const void *left, const void *right)) { | void list_qsort(list_t *list, int compare(const void *left, const void *right)) { | ||||||
| 	qsort(list->items, list->length, sizeof(void *), compare); | 	qsort(list->items, list->length, sizeof(void *), compare); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue