Fix indentation all through the project

Fixes a “regression” from 04918f3b0b, but
also other missed pieces.
dev
Emmanuel Gil Peyrot 3 years ago committed by Link Mauve
parent 48cd15ed44
commit eff793ab46
  1. 2
      clients/desktop-shell.c
  2. 6
      clients/dnd.c
  3. 6
      clients/terminal.c
  4. 6
      clients/window.c
  5. 2
      compositor/xwayland.c
  6. 4
      desktop-shell/exposay.c
  7. 22
      desktop-shell/shell.c
  8. 42
      include/libweston/libweston.h
  9. 2
      include/libweston/windowed-output-api.h
  10. 8
      libweston/animation.c
  11. 4
      libweston/backend-drm/drm-virtual.c
  12. 14
      libweston/backend-drm/fb.c
  13. 14
      libweston/backend-drm/state-propose.c
  14. 4
      libweston/backend-wayland/wayland.c
  15. 10
      libweston/backend-x11/x11.c
  16. 4
      libweston/compositor.c
  17. 16
      libweston/input.c
  18. 4
      libweston/libinput-device.c
  19. 4
      libweston/log.c
  20. 2
      libweston/pixman-renderer.c
  21. 4
      libweston/renderer-gl/gl-renderer.c
  22. 2
      libweston/weston-log-wayland.c
  23. 8
      shared/platform.h
  24. 2
      tests/weston-test.c
  25. 2
      xwayland/window-manager.c

@ -1460,7 +1460,7 @@ panel_add_launchers(struct panel *panel, struct desktop *desktop)
}
if (count == 0) {
char *name = file_name_with_datadir("terminal.png");
char *name = file_name_with_datadir("terminal.png");
/* add default launcher */
panel_add_launcher(panel,

@ -416,9 +416,9 @@ data_source_dnd_finished(void *data, struct wl_data_source *source)
delete_item =
dnd_drag->dnd_action == WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE;
/* The operation is already finished, we can destroy all
* related data.
*/
/* The operation is already finished, we can destroy all
* related data.
*/
dnd_drag_destroy(dnd_drag, delete_item);
window_schedule_redraw(dnd->window);
}

@ -1124,9 +1124,9 @@ redraw_handler(struct widget *widget, void *data)
cairo_stroke(cr);
}
/* skip space glyph (RLE) we use as a placeholder of
the right half of a double-width character,
because RLE is not available in every font. */
/* skip space glyph (RLE) we use as a placeholder of
the right half of a double-width character,
because RLE is not available in every font. */
if (p_row[col].ch == 0x200B)
continue;

@ -2214,9 +2214,9 @@ widget_set_tooltip(struct widget *parent, char *entry, float x, float y)
if (parent->tooltip_count > 1)
return 0;
tooltip = malloc(sizeof *tooltip);
if (!tooltip)
return -1;
tooltip = malloc(sizeof *tooltip);
if (!tooltip)
return -1;
parent->tooltip = tooltip;
tooltip->parent = parent;

@ -175,7 +175,7 @@ xserver_cleanup(struct weston_process *process, int status)
wxw->api->xserver_exited(wxw->xwayland, status);
wxw->sigusr1_source = wl_event_loop_add_signal(loop, SIGUSR1,
handle_sigusr1, wxw);
handle_sigusr1, wxw);
wxw->client = NULL;
}

@ -183,8 +183,8 @@ exposay_pick(struct desktop_shell *shell, int x, int y)
{
struct exposay_surface *esurface;
if (exposay_is_animating(shell))
return;
if (exposay_is_animating(shell))
return;
wl_list_for_each(esurface, &shell->exposay.surface_list, link) {
if (x < esurface->x || x > esurface->x + esurface->width)

@ -2465,17 +2465,17 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
if (weston_surface_is_mapped(surface) &&
shsurf->shell->win_close_animation_type == ANIMATION_FADE) {
if (shsurf->shell->compositor->state == WESTON_COMPOSITOR_ACTIVE) {
pixman_region32_fini(&surface->pending.input);
pixman_region32_init(&surface->pending.input);
pixman_region32_fini(&surface->input);
pixman_region32_init(&surface->input);
weston_fade_run(shsurf->view, 1.0, 0.0, 300.0,
fade_out_done, shsurf);
return;
} else {
--surface->ref_count;
}
if (shsurf->shell->compositor->state == WESTON_COMPOSITOR_ACTIVE) {
pixman_region32_fini(&surface->pending.input);
pixman_region32_init(&surface->pending.input);
pixman_region32_fini(&surface->input);
pixman_region32_init(&surface->input);
weston_fade_run(shsurf->view, 1.0, 0.0, 300.0,
fade_out_done, shsurf);
return;
} else {
--surface->ref_count;
}
}
weston_surface_destroy(surface);

@ -848,11 +848,11 @@ struct weston_seat {
};
enum {
WESTON_COMPOSITOR_ACTIVE, /* normal rendering and events */
WESTON_COMPOSITOR_IDLE, /* shell->unlock called on activity */
WESTON_COMPOSITOR_OFFSCREEN, /* no rendering, no frame events */
WESTON_COMPOSITOR_SLEEPING /* same as offscreen, but also set dpms
* to off */
WESTON_COMPOSITOR_ACTIVE, /* normal rendering and events */
WESTON_COMPOSITOR_IDLE, /* shell->unlock called on activity */
WESTON_COMPOSITOR_OFFSCREEN, /* no rendering, no frame events */
WESTON_COMPOSITOR_SLEEPING /* same as offscreen, but also set dpms
* to off */
};
struct weston_layer_entry {
@ -1012,22 +1012,22 @@ enum weston_capability {
* \endrststar
*/
struct weston_backend_config {
/** Major version for the backend-specific config struct
*
* This version must match exactly what the backend expects, otherwise
* the struct is incompatible.
*/
uint32_t struct_version;
/** Minor version of the backend-specific config struct
*
* This must be set to sizeof(struct backend-specific config).
* If the value here is smaller than what the backend expects, the
* extra config members will assume their default values.
*
* A value greater than what the backend expects is incompatible.
*/
size_t struct_size;
/** Major version for the backend-specific config struct
*
* This version must match exactly what the backend expects, otherwise
* the struct is incompatible.
*/
uint32_t struct_version;
/** Minor version of the backend-specific config struct
*
* This must be set to sizeof(struct backend-specific config).
* If the value here is smaller than what the backend expects, the
* extra config members will assume their default values.
*
* A value greater than what the backend expects is incompatible.
*/
size_t struct_size;
};
struct weston_backend;

@ -47,7 +47,7 @@ struct weston_windowed_output_api {
* Returns 0 on success, -1 on failure.
*
* This assigns a desired width and height to a windowed
* output. The backend decides what should be done and applies
* output. The backend decides what should be done and applies
* the desired configuration. After using this function and
* generic weston_output_set_*, a windowed
* output should be in a state where weston_output_enable()

@ -458,15 +458,15 @@ move_frame(struct weston_view_animation *animation)
progress = 1.0 - progress;
scale = animation->start +
(animation->stop - animation->start) *
progress;
(animation->stop - animation->start) *
progress;
weston_matrix_init(&animation->transform.matrix);
if (move->scale)
weston_matrix_scale(&animation->transform.matrix, scale, scale,
1.0f);
weston_matrix_translate(&animation->transform.matrix,
move->dx * progress, move->dy * progress,
0);
move->dx * progress, move->dy * progress,
0);
}
static void

@ -62,8 +62,8 @@ drm_virtual_crtc_create(struct drm_backend *b, struct drm_output *output)
crtc->pipe = 0;
/* Poisoning the pointers as CRTC's of virtual outputs should not be
* added to the DRM-backend CRTC list. With this we can assure (in
* function drm_virtual_crtc_destroy()) that this did not happen. */
* added to the DRM-backend CRTC list. With this we can assure (in
* function drm_virtual_crtc_destroy()) that this did not happen. */
crtc->link.prev = POISON_PTR;
crtc->link.next = POISON_PTR;

@ -238,13 +238,13 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf,
.modifier = dmabuf->attributes.modifier[0],
};
/* We should not import to KMS a buffer that has been allocated using no
* modifiers. Usually drivers use linear layouts to allocate with no
* modifiers, but this is not a rule. The driver could use, for
* instance, a tiling layout under the hood - and both Weston and the
* KMS driver can't know. So giving the buffer to KMS is not safe, as
* not knowing its layout can result in garbage being displayed. In
* short, importing a buffer to KMS requires explicit modifiers. */
/* We should not import to KMS a buffer that has been allocated using no
* modifiers. Usually drivers use linear layouts to allocate with no
* modifiers, but this is not a rule. The driver could use, for
* instance, a tiling layout under the hood - and both Weston and the
* KMS driver can't know. So giving the buffer to KMS is not safe, as
* not knowing its layout can result in garbage being displayed. In
* short, importing a buffer to KMS requires explicit modifiers. */
if (dmabuf->attributes.modifier[0] == DRM_FORMAT_MOD_INVALID)
return NULL;

@ -114,7 +114,7 @@ drm_output_destroy_zpos_plane(struct drm_plane_zpos *plane_zpos)
static bool
drm_output_check_plane_has_view_assigned(struct drm_plane *plane,
struct drm_output_state *output_state)
struct drm_output_state *output_state)
{
struct drm_plane_state *ps;
wl_list_for_each(ps, &output_state->plane_list, link) {
@ -140,12 +140,12 @@ drm_output_plane_has_valid_format(struct drm_plane *plane,
fb->format->format);
if (fmt) {
/* We never try to promote a dmabuf with DRM_FORMAT_MOD_INVALID
* to a KMS plane (see drm_fb_get_from_dmabuf() for more details).
* So if fb->modifier == DRM_FORMAT_MOD_INVALID, we are sure
* that this is for the legacy GBM import path, in which a
* wl_drm is being used for scanout. Mesa is the only user we
* care in this case (even though recent versions are also using
* dmabufs), and it should know better what works or not. */
* to a KMS plane (see drm_fb_get_from_dmabuf() for more details).
* So if fb->modifier == DRM_FORMAT_MOD_INVALID, we are sure
* that this is for the legacy GBM import path, in which a
* wl_drm is being used for scanout. Mesa is the only user we
* care in this case (even though recent versions are also using
* dmabufs), and it should know better what works or not. */
if (fb->modifier == DRM_FORMAT_MOD_INVALID)
return true;

@ -2212,8 +2212,8 @@ input_handle_touch_up(void *data, struct wl_touch *wl_touch,
static void
input_handle_touch_motion(void *data, struct wl_touch *wl_touch,
uint32_t time, int32_t id,
wl_fixed_t fixed_x, wl_fixed_t fixed_y)
uint32_t time, int32_t id,
wl_fixed_t fixed_x, wl_fixed_t fixed_y)
{
struct wayland_input *input = data;
struct wayland_output *output = input->touch_focus;

@ -807,14 +807,14 @@ x11_output_switch_mode(struct weston_output *base, struct weston_mode *mode)
static uint32_t values[2];
int ret;
b = to_x11_backend(base->compositor);
output = to_x11_output(base);
b = to_x11_backend(base->compositor);
output = to_x11_output(base);
if (mode->width == output->mode.width &&
if (mode->width == output->mode.width &&
mode->height == output->mode.height)
return 0;
return 0;
if (mode->width < WINDOW_MIN_WIDTH || mode->width > WINDOW_MAX_WIDTH)
if (mode->width < WINDOW_MIN_WIDTH || mode->width > WINDOW_MAX_WIDTH)
return -1;
if (mode->height < WINDOW_MIN_HEIGHT || mode->height > WINDOW_MAX_HEIGHT)

@ -4927,9 +4927,9 @@ static void
weston_compositor_dpms(struct weston_compositor *compositor,
enum dpms_enum state)
{
struct weston_output *output;
struct weston_output *output;
wl_list_for_each(output, &compositor->output_list, link)
wl_list_for_each(output, &compositor->output_list, link)
if (output->set_dpms)
output->set_dpms(output, state);
}

@ -523,8 +523,8 @@ pointer_send_motion(struct weston_pointer *pointer,
msecs = timespec_to_msec(time);
wl_resource_for_each(resource, resource_list) {
send_timestamps_for_input_resource(resource,
&pointer->timestamps_list,
time);
&pointer->timestamps_list,
time);
wl_pointer_send_motion(resource, msecs, sx, sy);
}
}
@ -609,8 +609,8 @@ weston_pointer_send_button(struct weston_pointer *pointer,
msecs = timespec_to_msec(time);
wl_resource_for_each(resource, resource_list) {
send_timestamps_for_input_resource(resource,
&pointer->timestamps_list,
time);
&pointer->timestamps_list,
time);
wl_pointer_send_button(resource, serial, msecs, button, state);
}
}
@ -1965,7 +1965,7 @@ weston_keyboard_set_locks(struct weston_keyboard *keyboard,
mods_locked = xkb_state_serialize_mods(keyboard->xkb_state.state,
XKB_STATE_LOCKED);
group = xkb_state_serialize_group(keyboard->xkb_state.state,
XKB_STATE_EFFECTIVE);
XKB_STATE_EFFECTIVE);
num = (1 << keyboard->xkb_info->mod2_mod);
caps = (1 << keyboard->xkb_info->caps_mod);
@ -2783,7 +2783,7 @@ seat_get_pointer(struct wl_client *client, struct wl_resource *resource,
struct wl_resource *cr;
struct weston_pointer_client *pointer_client;
cr = wl_resource_create(client, &wl_pointer_interface,
cr = wl_resource_create(client, &wl_pointer_interface,
wl_resource_get_version(resource), id);
if (cr == NULL) {
wl_client_post_no_memory(client);
@ -2864,7 +2864,7 @@ seat_get_keyboard(struct wl_client *client, struct wl_resource *resource,
struct weston_keyboard *keyboard = seat ? seat->keyboard_state : NULL;
struct wl_resource *cr;
cr = wl_resource_create(client, &wl_keyboard_interface,
cr = wl_resource_create(client, &wl_keyboard_interface,
wl_resource_get_version(resource), id);
if (cr == NULL) {
wl_client_post_no_memory(client);
@ -2957,7 +2957,7 @@ seat_get_touch(struct wl_client *client, struct wl_resource *resource,
struct weston_touch *touch = seat ? seat->touch_state : NULL;
struct wl_resource *cr;
cr = wl_resource_create(client, &wl_touch_interface,
cr = wl_resource_create(client, &wl_touch_interface,
wl_resource_get_version(resource), id);
if (cr == NULL) {
wl_client_post_no_memory(client);

@ -192,8 +192,8 @@ handle_pointer_button(struct libinput_device *libinput_device,
libinput_event_pointer_get_time_usec(pointer_event));
notify_button(device->seat, &time,
libinput_event_pointer_get_button(pointer_event),
button_state);
libinput_event_pointer_get_button(pointer_event),
button_state);
return true;
}

@ -71,8 +71,8 @@ static log_func_t log_continue_handler = default_log_handler;
static int
default_log_handler(const char *fmt, va_list ap)
{
fprintf(stderr, "weston_log_set_handler() must be called before using of weston_log().\n");
abort();
fprintf(stderr, "weston_log_set_handler() must be called before using of weston_log().\n");
abort();
}
/** Install the log handler

@ -669,7 +669,7 @@ pixman_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
wl_shm_buffer_get_format(shm_buffer));
weston_buffer_reference(&ps->buffer_ref, NULL);
weston_buffer_release_reference(&ps->buffer_release_ref, NULL);
weston_buffer_send_server_error(buffer,
weston_buffer_send_server_error(buffer,
"disconnecting due to unhandled buffer type");
return;
break;

@ -593,7 +593,7 @@ texture_region(struct weston_view *ev,
vtxcnt = wl_array_add(&gr->vtxcnt, nrects * nsurf * sizeof *vtxcnt);
inv_width = 1.0 / gs->pitch;
inv_height = 1.0 / gs->height;
inv_height = 1.0 / gs->height;
for (i = 0; i < nrects; i++) {
pixman_box32_t *rect = &rects[i];
@ -2960,7 +2960,7 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
gs->buffer_type = BUFFER_TYPE_NULL;
gs->y_inverted = true;
es->is_opaque = false;
weston_buffer_send_server_error(buffer,
weston_buffer_send_server_error(buffer,
"disconnecting due to unhandled buffer type");
}
}

@ -59,7 +59,7 @@ struct weston_log_debug_wayland {
static struct weston_log_debug_wayland *
to_weston_log_debug_wayland(struct weston_log_subscriber *sub)
{
return container_of(sub, struct weston_log_debug_wayland, base);
return container_of(sub, struct weston_log_debug_wayland, base);
}
static void

@ -93,8 +93,8 @@ weston_platform_get_egl_display(EGLenum platform, void *native_display,
if (!get_platform_display) {
get_platform_display = (PFNEGLGETPLATFORMDISPLAYEXTPROC)
weston_platform_get_egl_proc_address(
"eglGetPlatformDisplayEXT");
weston_platform_get_egl_proc_address(
"eglGetPlatformDisplayEXT");
}
if (get_platform_display)
@ -114,8 +114,8 @@ weston_platform_create_egl_surface(EGLDisplay dpy, EGLConfig config,
if (!create_platform_window) {
create_platform_window = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)
weston_platform_get_egl_proc_address(
"eglCreatePlatformWindowSurfaceEXT");
weston_platform_get_egl_proc_address(
"eglCreatePlatformWindowSurfaceEXT");
}
if (create_platform_window)

@ -171,7 +171,7 @@ test_surface_committed(struct weston_surface *surface, int32_t sx, int32_t sy)
static int
test_surface_get_label(struct weston_surface *surface, char *buf, size_t len)
{
return snprintf(buf, len, "test suite surface");
return snprintf(buf, len, "test suite surface");
}
static void

@ -1497,7 +1497,7 @@ weston_wm_window_create(struct weston_wm *wm,
geometry_cookie = xcb_get_geometry(wm->conn, id);
values[0] = XCB_EVENT_MASK_PROPERTY_CHANGE |
XCB_EVENT_MASK_FOCUS_CHANGE;
XCB_EVENT_MASK_FOCUS_CHANGE;
xcb_change_window_attributes(wm->conn, id, XCB_CW_EVENT_MASK, values);
window->wm = wm;

Loading…
Cancel
Save