mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-09-19 13:52:48 +00:00
reduce nesting in commitnotify()
This commit is contained in:
@@ -933,7 +933,9 @@ commitnotify(struct wl_listener *listener, void *data)
|
|||||||
{
|
{
|
||||||
Client *c = wl_container_of(listener, c, commit);
|
Client *c = wl_container_of(listener, c, commit);
|
||||||
|
|
||||||
if (c->surface.xdg->initial_commit) {
|
if (!c->surface.xdg->initial_commit)
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the monitor this client will be rendered on
|
* Get the monitor this client will be rendered on
|
||||||
* Note that if the user set a rule in which the client is placed on
|
* Note that if the user set a rule in which the client is placed on
|
||||||
@@ -941,9 +943,8 @@ commitnotify(struct wl_listener *listener, void *data)
|
|||||||
* a wrong monitor.
|
* a wrong monitor.
|
||||||
*/
|
*/
|
||||||
applyrules(c);
|
applyrules(c);
|
||||||
if (c->mon) {
|
if (c->mon)
|
||||||
client_set_scale(client_surface(c), c->mon->wlr_output->scale);
|
client_set_scale(client_surface(c), c->mon->wlr_output->scale);
|
||||||
}
|
|
||||||
setmon(c, NULL, 0); /* Make sure to reapply rules in mapnotify() */
|
setmon(c, NULL, 0); /* Make sure to reapply rules in mapnotify() */
|
||||||
|
|
||||||
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel,
|
wlr_xdg_toplevel_set_wm_capabilities(c->surface.xdg->toplevel,
|
||||||
@@ -954,8 +955,6 @@ commitnotify(struct wl_listener *listener, void *data)
|
|||||||
if (!c->isfloating)
|
if (!c->isfloating)
|
||||||
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT |
|
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT |
|
||||||
WLR_EDGE_RIGHT);
|
WLR_EDGE_RIGHT);
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user