mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-14 21:07:28 -08:00
updates
This commit is contained in:
parent
3d54f28eed
commit
6d8f1a8474
1 changed files with 0 additions and 66 deletions
66
dwl.c
66
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;
|
||||
|
|
Loading…
Reference in a new issue