mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-09-07 19:54:43 +00:00
optimize:remove the redundant resize
This commit is contained in:
parent
4456f4536a
commit
fd6b1d20fd
3
client.h
3
client.h
@ -366,9 +366,8 @@ client_set_tiled(Client *c, uint32_t edges)
|
||||
if (wl_resource_get_version(c->surface.xdg->toplevel->resource)
|
||||
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
|
||||
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
|
||||
} else {
|
||||
wlr_xdg_toplevel_set_maximized(c->surface.xdg->toplevel, edges != WLR_EDGE_NONE);
|
||||
}
|
||||
wlr_xdg_toplevel_set_maximized(c->surface.xdg->toplevel, edges != WLR_EDGE_NONE);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
8
dwl.c
8
dwl.c
@ -869,17 +869,21 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
|
||||
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel,
|
||||
WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
||||
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT | WLR_EDGE_RIGHT);
|
||||
if (c->decoration)
|
||||
requestdecorationmode(&c->set_decoration_mode, c->decoration);
|
||||
wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
resize(c, c->geom, (c->isfloating && !c->isfullscreen));
|
||||
if(!c->resize)
|
||||
return;
|
||||
|
||||
/* mark a pending resize as completed */
|
||||
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial)
|
||||
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial) {
|
||||
c->resize = 0;
|
||||
wlr_output_schedule_frame(c->mon->wlr_output);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user