Apply clang-format

This commit is contained in:
Cagebreak Signing Key 3 2020-09-06 17:41:45 +02:00
commit b0aa100e3e
8 changed files with 19 additions and 14 deletions

View file

@ -11,13 +11,13 @@
#include "config.h"
#include <fontconfig/fontconfig.h>
#include <unistd.h>
#include <pango.h>
#include <pango/pangocairo.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>

View file

@ -1,7 +1,7 @@
#define _POSIX_C_SOURCE 200809L
#include <unistd.h>
#include <string.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/backend/multi.h>
#include <wlr/backend/session.h>
@ -963,7 +963,9 @@ run_action(enum keybinding_action action, struct cg_server *server,
keybinding_configure_output(server, data.o_cfg);
break;
case KEYBINDING_CLOSE_VIEW:
keybinding_close_view(server->curr_output->workspaces[server->curr_output->curr_workspace]->focused_tile->view);
keybinding_close_view(
server->curr_output->workspaces[server->curr_output->curr_workspace]
->focused_tile->view);
break;
default: {
wlr_log(WLR_ERROR,

View file

@ -7,9 +7,9 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/util/log.h>
#include "pango.h"
#include "message.h"
#include "output.h"
#include "pango.h"
#include "server.h"
cairo_subpixel_order_t

View file

@ -13,8 +13,8 @@
#include "config.h"
#include <wlr/config.h>
#include <unistd.h>
#include <string.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/backend/wayland.h>

View file

@ -1,7 +1,7 @@
#define _POSIX_C_SOURCE 200812L
#include <string.h>
#include <limits.h>
#include <string.h>
#include <wlr/util/log.h>
#include "keybinding.h"

2
view.h
View file

@ -4,8 +4,8 @@
#include "config.h"
#include <stdbool.h>
#include <wlr/types/wlr_surface.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_surface.h>
struct cg_server;
struct wlr_box;

View file

@ -216,7 +216,7 @@ activate(struct cg_view *view, bool activate) {
static void
close(struct cg_view *view) {
struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view);
struct wlr_xdg_surface *surface=xdg_shell_view->xdg_surface;
struct wlr_xdg_surface *surface = xdg_shell_view->xdg_surface;
if(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) {
wlr_xdg_toplevel_send_close(surface);
}
@ -325,7 +325,7 @@ static const struct cg_view_impl xdg_shell_view_impl = {
.get_geometry = get_geometry,
.is_primary = is_primary,
.activate = activate,
.close = close,
.close = close,
.maximize = maximize,
.destroy = destroy,
.for_each_surface = for_each_surface,

View file

@ -149,11 +149,14 @@ handle_xwayland_surface_commit(struct wl_listener *listener, void *_data) {
wl_container_of(listener, xwayland_view, commit);
struct cg_view *view = &xwayland_view->view;
/* xwayland surface has moved */
if(xwayland_view->xwayland_surface->x != view->ox || xwayland_view->xwayland_surface->y != view->oy) {
output_damage_surface(view->workspace->output, view->wlr_surface,view->ox,view->oy,true);
view->ox=xwayland_view->xwayland_surface->x;
view->oy=xwayland_view->xwayland_surface->y;
output_damage_surface(view->workspace->output, view->wlr_surface,view->ox,view->oy,true);
if(xwayland_view->xwayland_surface->x != view->ox ||
xwayland_view->xwayland_surface->y != view->oy) {
output_damage_surface(view->workspace->output, view->wlr_surface,
view->ox, view->oy, true);
view->ox = xwayland_view->xwayland_surface->x;
view->oy = xwayland_view->xwayland_surface->y;
output_damage_surface(view->workspace->output, view->wlr_surface,
view->ox, view->oy, true);
} else {
view_damage_part(view);
}