mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
No borders on fullscreen windows
Some code has been borrowed from the smartBorders patch
This commit is contained in:
parent
dd3920e75d
commit
de6db97401
1 changed files with 8 additions and 1 deletions
9
dwl.c
9
dwl.c
|
@ -1045,7 +1045,9 @@ destroyxdeco(struct wl_listener *listener, void *data)
|
||||||
void
|
void
|
||||||
fullscreenotify(struct wl_listener *listener, void *data) {
|
fullscreenotify(struct wl_listener *listener, void *data) {
|
||||||
Client *c = wl_container_of(listener, c, fullscreen);
|
Client *c = wl_container_of(listener, c, fullscreen);
|
||||||
wlr_xdg_toplevel_set_fullscreen(c->surface.xdg, !c->surface.xdg->toplevel->current.fullscreen);
|
wlr_xdg_toplevel_set_fullscreen(
|
||||||
|
c->surface.xdg, !c->surface.xdg->toplevel->current.fullscreen);
|
||||||
|
c->bw = (int)c->surface.xdg->toplevel->current.fullscreen * borderpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
Monitor *
|
Monitor *
|
||||||
|
@ -1670,6 +1672,10 @@ renderclients(Monitor *m, struct timespec *now)
|
||||||
ox = c->geom.x, oy = c->geom.y;
|
ox = c->geom.x, oy = c->geom.y;
|
||||||
wlr_output_layout_output_coords(output_layout, m->wlr_output,
|
wlr_output_layout_output_coords(output_layout, m->wlr_output,
|
||||||
&ox, &oy);
|
&ox, &oy);
|
||||||
|
|
||||||
|
if (c->bw == 0)
|
||||||
|
goto render;
|
||||||
|
|
||||||
w = surface->current.width;
|
w = surface->current.width;
|
||||||
h = surface->current.height;
|
h = surface->current.height;
|
||||||
borders = (struct wlr_box[4]) {
|
borders = (struct wlr_box[4]) {
|
||||||
|
@ -1687,6 +1693,7 @@ renderclients(Monitor *m, struct timespec *now)
|
||||||
m->wlr_output->transform_matrix);
|
m->wlr_output->transform_matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
render:
|
||||||
/* This calls our render function for each surface among the
|
/* This calls our render function for each surface among the
|
||||||
* xdg_surface's toplevel and popups. */
|
* xdg_surface's toplevel and popups. */
|
||||||
rdata.output = m->wlr_output;
|
rdata.output = m->wlr_output;
|
||||||
|
|
Loading…
Reference in a new issue