mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-22 06:59:44 -05:00
Fix style issues
This commit is contained in:
parent
53052b3f6e
commit
f998bb8299
14 changed files with 36 additions and 18 deletions
|
|
@ -23,7 +23,10 @@ void wlr_input_device_init(struct wlr_input_device *dev,
|
|||
}
|
||||
|
||||
void wlr_input_device_destroy(struct wlr_input_device *dev) {
|
||||
if (!dev) return;
|
||||
if (!dev) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dev->_device) {
|
||||
switch (dev->type) {
|
||||
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) {
|
||||
if (!kb) return;
|
||||
if (!kb) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (kb->impl && kb->impl->destroy) {
|
||||
kb->impl->destroy(kb);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ void wlr_pointer_init(struct wlr_pointer *pointer,
|
|||
}
|
||||
|
||||
void wlr_pointer_destroy(struct wlr_pointer *pointer) {
|
||||
if (!pointer) return;
|
||||
if (!pointer) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pointer->impl && pointer->impl->destroy) {
|
||||
pointer->impl->destroy(pointer);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ static void surface_damage(struct wl_client *client,
|
|||
}
|
||||
surface->pending.invalid |= WLR_SURFACE_INVALID_SURFACE_DAMAGE;
|
||||
pixman_region32_union_rect(&surface->pending.surface_damage,
|
||||
&surface->pending.surface_damage,
|
||||
x, y, width, height);
|
||||
&surface->pending.surface_damage,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
static void destroy_frame_callback(struct wl_resource *resource) {
|
||||
|
|
@ -142,7 +142,7 @@ void wlr_surface_flush_damage(struct wlr_surface *surface) {
|
|||
for (int i = 0; i < n; ++i) {
|
||||
pixman_box32_t rect = rects[i];
|
||||
if (!wlr_texture_update_shm(surface->texture, format,
|
||||
rect.x1, rect.y1,
|
||||
rect.x1, rect.y1,
|
||||
rect.x2 - rect.x1,
|
||||
rect.y2 - rect.y1,
|
||||
buffer)) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ void wlr_tablet_pad_init(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) {
|
||||
pad->impl->destroy(pad);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ void wlr_touch_init(struct wlr_touch *touch,
|
|||
}
|
||||
|
||||
void wlr_touch_destroy(struct wlr_touch *touch) {
|
||||
if (!touch) return;
|
||||
if (!touch) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (touch->impl && touch->impl->destroy) {
|
||||
touch->impl->destroy(touch);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue