mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-11-13 13:29:52 -05:00
apply alwayscenter patch
This commit is contained in:
parent
f49e94f455
commit
0bbf1f65da
2 changed files with 9 additions and 9 deletions
6
dwl.c
6
dwl.c
|
|
@ -1830,8 +1830,9 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||
{
|
||||
/* Called when the surface is mapped, or ready to display on-screen. */
|
||||
Client *p, *w, *c = wl_container_of(listener, c, map);
|
||||
Monitor *m;
|
||||
Monitor *m = selmon;
|
||||
int i;
|
||||
struct wlr_box b = center_relative_to_monitor ? m->m : m->w;
|
||||
|
||||
/* Create scene tree for this client and its border */
|
||||
c->scene = client_surface(c)->data = wlr_scene_tree_create(layers[LyrTile]);
|
||||
|
|
@ -1870,6 +1871,9 @@ mapnotify(struct wl_listener *listener, void *data)
|
|||
wl_list_insert(&clients, &c->link);
|
||||
wl_list_insert(&fstack, &c->flink);
|
||||
|
||||
c->geom.x = (b.width - c->geom.width) / 2 + b.x;
|
||||
c->geom.y = (b.height - c->geom.height) / 2 + b.y;
|
||||
|
||||
/* Set initial monitor, tags, floating status, and focus:
|
||||
* we always consider floating, clients that have parent and thus
|
||||
* we set the same tags and monitor than its parent, if not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue