Fix spacing and replace it with tabs

This commit is contained in:
godalming123 2023-02-18 16:15:07 +00:00 committed by Leonardo Hernández
parent 737688a6b1
commit c69a2bec3f

34
dwl.c
View file

@ -98,7 +98,7 @@ typedef struct Monitor Monitor;
typedef struct { typedef struct {
/* Must keep these three elements in this order */ /* Must keep these three elements in this order */
unsigned int type; /* XDGShell or X11* */ unsigned int type; /* XDGShell or X11* */
struct wlr_box geom; /* layout-relative, includes border */ struct wlr_box geom; /* layout-relative, includes border */
Monitor *mon; Monitor *mon;
struct wlr_scene_tree *scene; struct wlr_scene_tree *scene;
struct wlr_scene_rect *border[4]; /* top, bottom, left, right */ struct wlr_scene_rect *border[4]; /* top, bottom, left, right */
@ -116,7 +116,7 @@ typedef struct {
struct wl_listener destroy; struct wl_listener destroy;
struct wl_listener set_title; struct wl_listener set_title;
struct wl_listener fullscreen; struct wl_listener fullscreen;
struct wlr_box prev; /* layout-relative, includes border */ struct wlr_box prev; /* layout-relative, includes border */
#ifdef XWAYLAND #ifdef XWAYLAND
struct wl_listener activate; struct wl_listener activate;
struct wl_listener configure; struct wl_listener configure;
@ -181,8 +181,8 @@ struct Monitor {
struct wl_listener destroy; struct wl_listener destroy;
struct wl_listener destroy_lock_surface; struct wl_listener destroy_lock_surface;
struct wlr_session_lock_surface_v1 *lock_surface; struct wlr_session_lock_surface_v1 *lock_surface;
struct wlr_box m; /* monitor area, layout-relative */ struct wlr_box m; /* monitor area, layout-relative */
struct wlr_box w; /* window area, layout-relative */ struct wlr_box w; /* window area, layout-relative */
struct wl_list layers[4]; /* LayerSurface::link */ struct wl_list layers[4]; /* LayerSurface::link */
const Layout *lt[2]; const Layout *lt[2];
unsigned int seltags; unsigned int seltags;
@ -423,8 +423,8 @@ applybounds(Client *c, struct wlr_box *bbox)
/* try to set size hints */ /* try to set size hints */
c->geom.width = MAX(min.width + (2 * (int)c->bw), c->geom.width); c->geom.width = MAX(min.width + (2 * (int)c->bw), c->geom.width);
c->geom.height = MAX(min.height + (2 * (int)c->bw), c->geom.height); c->geom.height = MAX(min.height + (2 * (int)c->bw), c->geom.height);
/* Some clients set their max size to INT_MAX, which does not violate the /* Some clients set their max size to INT_MAX, which does not violate the
* protocol but its unnecesary, as they can set their max size to zero. */ * protocol but its unnecesary, as they can set their max size to zero. */
if (max.width > 0 && !(2 * c->bw > INT_MAX - max.width)) /* Checks for overflow */ if (max.width > 0 && !(2 * c->bw > INT_MAX - max.width)) /* Checks for overflow */
c->geom.width = MIN(max.width + (2 * c->bw), c->geom.width); c->geom.width = MIN(max.width + (2 * c->bw), c->geom.width);
if (max.height > 0 && !(2 * c->bw > INT_MAX - max.height)) /* Checks for overflow */ if (max.height > 0 && !(2 * c->bw > INT_MAX - max.height)) /* Checks for overflow */
@ -1020,7 +1020,7 @@ void
createpointer(struct wlr_pointer *pointer) createpointer(struct wlr_pointer *pointer)
{ {
if (wlr_input_device_is_libinput(&pointer->base)) { if (wlr_input_device_is_libinput(&pointer->base)) {
struct libinput_device *libinput_device = (struct libinput_device*) struct libinput_device *libinput_device = (struct libinput_device*)
wlr_libinput_get_device_handle(&pointer->base); wlr_libinput_get_device_handle(&pointer->base);
if (libinput_device_config_tap_get_finger_count(libinput_device)) { if (libinput_device_config_tap_get_finger_count(libinput_device)) {
@ -1288,16 +1288,16 @@ focusstack(const Arg *arg)
if (arg->i > 0) { if (arg->i > 0) {
wl_list_for_each(c, &sel->link, link) { wl_list_for_each(c, &sel->link, link) {
if (&c->link == &clients) if (&c->link == &clients)
continue; /* wrap past the sentinel node */ continue; /* wrap past the sentinel node */
if (VISIBLEON(c, selmon)) if (VISIBLEON(c, selmon))
break; /* found it */ break; /* found it */
} }
} else { } else {
wl_list_for_each_reverse(c, &sel->link, link) { wl_list_for_each_reverse(c, &sel->link, link) {
if (&c->link == &clients) if (&c->link == &clients)
continue; /* wrap past the sentinel node */ continue; /* wrap past the sentinel node */
if (VISIBLEON(c, selmon)) if (VISIBLEON(c, selmon))
break; /* found it */ break; /* found it */
} }
} }
/* If only one client is visible on selmon, then c == sel */ /* If only one client is visible on selmon, then c == sel */
@ -1729,7 +1729,7 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test)
{ {
/* /*
* Called when a client such as wlr-randr requests a change in output * Called when a client such as wlr-randr requests a change in output
* configuration. This is only one way that the layout can be changed, * configuration. This is only one way that the layout can be changed,
* so any Monitor information should be updated by updatemons() after an * so any Monitor information should be updated by updatemons() after an
* output_layout.change event, not here. * output_layout.change event, not here.
*/ */
@ -1969,7 +1969,7 @@ run(char *startup_cmd)
selmon = xytomon(cursor->x, cursor->y); selmon = xytomon(cursor->x, cursor->y);
/* TODO hack to get cursor to display in its initial location (100, 100) /* TODO hack to get cursor to display in its initial location (100, 100)
* instead of (0, 0) and then jumping. still may not be fully * instead of (0, 0) and then jumping. still may not be fully
* initialized, as the image/coordinates are not transformed for the * initialized, as the image/coordinates are not transformed for the
* monitor when displayed here */ * monitor when displayed here */
wlr_cursor_warp_closest(cursor, NULL, cursor->x, cursor->y); wlr_cursor_warp_closest(cursor, NULL, cursor->x, cursor->y);
@ -2487,7 +2487,7 @@ updatemons(struct wl_listener *listener, void *data)
{ {
/* /*
* Called whenever the output layout changes: adding or removing a * Called whenever the output layout changes: adding or removing a
* monitor, changing an output's mode or position, etc. This is where * monitor, changing an output's mode or position, etc. This is where
* the change officially happens and we update geometry, window * the change officially happens and we update geometry, window
* positions, focus, and the stored configuration in wlroots' * positions, focus, and the stored configuration in wlroots'
* output-manager implementation. * output-manager implementation.
@ -2755,8 +2755,8 @@ sigchld(int unused)
{ {
siginfo_t in; siginfo_t in;
/* We should be able to remove this function in favor of a simple /* We should be able to remove this function in favor of a simple
* struct sigaction sa = {.sa_handler = SIG_IGN}; * struct sigaction sa = {.sa_handler = SIG_IGN};
* sigaction(SIGCHLD, &sa, NULL); * sigaction(SIGCHLD, &sa, NULL);
* but the Xwayland implementation in wlroots currently prevents us from * but the Xwayland implementation in wlroots currently prevents us from
* setting our own disposition for SIGCHLD. * setting our own disposition for SIGCHLD.
*/ */
@ -2779,7 +2779,7 @@ xwaylandready(struct wl_listener *listener, void *data)
return; return;
} }
/* Collect atoms we are interested in. If getatom returns 0, we will /* Collect atoms we are interested in. If getatom returns 0, we will
* not detect that window type. */ * not detect that window type. */
netatom[NetWMWindowTypeDialog] = getatom(xc, "_NET_WM_WINDOW_TYPE_DIALOG"); netatom[NetWMWindowTypeDialog] = getatom(xc, "_NET_WM_WINDOW_TYPE_DIALOG");
netatom[NetWMWindowTypeSplash] = getatom(xc, "_NET_WM_WINDOW_TYPE_SPLASH"); netatom[NetWMWindowTypeSplash] = getatom(xc, "_NET_WM_WINDOW_TYPE_SPLASH");