Apply clang-format

This commit is contained in:
Cagebreak Signing Key 3 2020-09-12 17:22:16 +02:00
commit 70d2448924
6 changed files with 20 additions and 14 deletions

View file

@ -23,6 +23,7 @@
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_data_control_v1.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h>
@ -31,7 +32,6 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_server_decoration.h>
#include <wlr/types/wlr_data_control_v1.h>
#if CG_HAS_XWAYLAND
#include <wlr/types/wlr_xcursor_manager.h>
#endif
@ -357,7 +357,8 @@ main(int argc, char *argv[]) {
goto end;
}
data_control_manager=wlr_data_control_manager_v1_create(server.wl_display);
data_control_manager =
wlr_data_control_manager_v1_create(server.wl_display);
if(!data_control_manager) {
wlr_log(WLR_ERROR, "Unable to create the data control manager");
ret = 1;

View file

@ -32,13 +32,13 @@
#include <wlr/xwayland.h>
#include "keybinding.h"
#include "view.h"
#include "message.h"
#include "output.h"
#include "render.h"
#include "seat.h"
#include "server.h"
#include "util.h"
#include "view.h"
#include "workspace.h"
#if CG_HAS_XWAYLAND
#include "xwayland.h"
@ -595,7 +595,7 @@ handle_new_output(struct wl_listener *listener, void *data) {
wl_list_init(&output->messages);
if(!wlr_xcursor_manager_load(server->seat->xcursor_manager,
wlr_output->scale)) {
wlr_output->scale)) {
wlr_log(WLR_ERROR,
"Cannot load XCursor theme for output '%s' with scale %f",
wlr_output->name, wlr_output->scale);

12
view.c
View file

@ -318,7 +318,8 @@ view_unmap(struct cg_view *view) {
}
void
view_map(struct cg_view *view, struct wlr_surface *surface, struct cg_workspace *ws) {
view_map(struct cg_view *view, struct wlr_surface *surface,
struct cg_workspace *ws) {
struct cg_output *output = ws->output;
view->wlr_surface = surface;
@ -331,21 +332,18 @@ view_map(struct cg_view *view, struct wlr_surface *surface, struct cg_workspace
wl_signal_add(&view->wlr_surface->events.new_subsurface,
&view->new_subsurface);
view->workspace=ws;
view->workspace = ws;
#if CG_HAS_XWAYLAND
/* We shouldn't position override-redirect windows. They set
their own (x,y) coordinates in handle_wayland_surface_map. */
if(view->type == CG_XWAYLAND_VIEW && !xwayland_view_should_manage(view)) {
wl_list_insert(
&ws->unmanaged_views,
&view->link);
wl_list_insert(&ws->unmanaged_views, &view->link);
} else
#endif
{
view_position(view);
wl_list_insert(&ws->views,
&view->link);
wl_list_insert(&ws->views, &view->link);
}
seat_set_focus(output->server->seat, view);
}

3
view.h
View file

@ -99,7 +99,8 @@ view_unmap(struct cg_view *view);
void
view_maximize(struct cg_view *view, const struct wlr_box *tile_box);
void
view_map(struct cg_view *view, struct wlr_surface *surface, struct cg_workspace *ws);
view_map(struct cg_view *view, struct wlr_surface *surface,
struct cg_workspace *ws);
void
view_destroy(struct cg_view *view);
void

View file

@ -300,7 +300,10 @@ handle_xdg_shell_surface_map(struct wl_listener *listener, void *_data) {
wl_signal_add(&xdg_shell_view->xdg_surface->surface->events.commit,
&xdg_shell_view->commit);
view_map(view, xdg_shell_view->xdg_surface->surface,view->workspace->server->curr_output->workspaces[view->workspace->server->curr_output->curr_workspace]);
view_map(
view, xdg_shell_view->xdg_surface->surface,
view->workspace->server->curr_output
->workspaces[view->workspace->server->curr_output->curr_workspace]);
view_damage_whole(view);
}

View file

@ -188,7 +188,10 @@ handle_xwayland_surface_map(struct wl_listener *listener, void *_data) {
wl_signal_add(&xwayland_view->xwayland_surface->surface->events.commit,
&xwayland_view->commit);
view_map(view, xwayland_view->xwayland_surface->surface,view->workspace->server->curr_output->workspaces[view->workspace->server->curr_output->curr_workspace]);
view_map(
view, xwayland_view->xwayland_surface->surface,
view->workspace->server->curr_output
->workspaces[view->workspace->server->curr_output->curr_workspace]);
view_damage_whole(view);
}