diff --git a/dwl.c b/dwl.c index b848ff0..cd160ef 100644 --- a/dwl.c +++ b/dwl.c @@ -338,7 +338,6 @@ static void pointerconstraintsetregion(struct wl_listener *listener, void *data) static void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy, uint32_t time); static void printstatus(void); -static void wlr_output_damage_whole(struct wlr_output *output); static void powermgrsetmodenotify(struct wl_listener *listener, void *data); static void quit(const Arg *arg); static void rendermon(struct wl_listener *listener, void *data); @@ -2464,35 +2463,6 @@ powermgrsetmodenotify(struct wl_listener *listener, void *data) wlr_output_commit(event->output); } -void -wlr_output_damage_whole(struct wlr_output *output) { - int width, height; - pixman_region32_t damage; - struct wlr_output_event_damage event; - - wlr_output_transformed_resolution(output, &width, &height); - - pixman_region32_init_rect(&damage, 0, 0, width, height); - - event = (struct wlr_output_event_damage){ - .output = output, - .damage = &damage, - }; - wl_signal_emit_mutable(&output->events.damage, &event); - - pixman_region32_fini(&damage); -} - -void -powermgrsetmodenotify(struct wl_listener *listener, void *data) -{ - struct wlr_output_power_v1_set_mode_event *event = data; - wlr_output_enable(event->output, event->mode); - if (event->mode) - wlr_output_damage_whole(event->output); - wlr_output_commit(event->output); -} - void quit(const Arg *arg) { @@ -3142,42 +3112,6 @@ vertile(Monitor *m) } } -void -vertile(Monitor *m) -{ - unsigned int i, n = 0, h, mh, my, ty, draw_borders = 1; - Client *c; - - wl_list_for_each(c, &clients, link) - if (VISIBLEON(c, m) && !c->isfloating) - n++; - if (n == 0) - return; - - if (n == smartborders) - draw_borders = 0; - - if (n > m->nmaster) - ty = mh = m->nmaster ? m->w.height * m->mfact : 0; - else - ty = mh = m->w.height; - i = my = 0; - wl_list_for_each(c, &clients, link) { - if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen) - continue; - if (i < m->nmaster) { - h = ( mh - my ) / (MIN(n, m->nmaster) - i); - resize(c, (struct wlr_box) { .x = m->w.x, .y = m->w.y + my, .width = m->w.width, .height = h }, 0, draw_borders); - my += c->geom.height; - } else { - h = ( m->w.height - ty ) / (n - i); - resize(c, (struct wlr_box) { .x = m->w.x, .y = m->w.y + ty, .width = m->w.width, .height = h }, 0, draw_borders); - ty += c->geom.height; - } - i++; - } -} - void togglebar(const Arg *arg) { DwlIpcOutput *ipc_output;