diff options
author | nicm <nicm> | 2019-11-28 09:45:15 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-11-28 09:45:15 +0000 |
commit | 2349b1dbef7cd0b4a165cd234d6757c34d5e02e6 (patch) | |
tree | 7d051ac6498399b82bb4418c87bad8fb01d831ec /spawn.c | |
parent | 067604bf8cb23c1a208d26d94dbae7c2ab46dabf (diff) | |
download | rtmux-2349b1dbef7cd0b4a165cd234d6757c34d5e02e6.tar.gz rtmux-2349b1dbef7cd0b4a165cd234d6757c34d5e02e6.tar.bz2 rtmux-2349b1dbef7cd0b4a165cd234d6757c34d5e02e6.zip |
Make a best effort to set xpixel and ypixel for each pane and add
formats for them.
Diffstat (limited to 'spawn.c')
-rw-r--r-- | spawn.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -85,7 +85,7 @@ spawn_window(struct spawn_context *sc, char **cause) struct window_pane *wp; struct winlink *wl; int idx = sc->idx; - u_int sx, sy; + u_int sx, sy, xpixel, ypixel; spawn_log(__func__, sc); @@ -155,8 +155,9 @@ spawn_window(struct spawn_context *sc, char **cause) xasprintf(cause, "couldn't add window %d", idx); return (NULL); } - default_window_size(sc->c, s, NULL, &sx, &sy, -1); - if ((w = window_create(sx, sy)) == NULL) { + default_window_size(sc->c, s, NULL, &sx, &sy, &xpixel, &ypixel, + -1); + if ((w = window_create(sx, sy, xpixel, ypixel)) == NULL) { winlink_remove(&s->windows, sc->wl); xasprintf(cause, "couldn't create window %d", idx); return (NULL); @@ -338,6 +339,8 @@ spawn_pane(struct spawn_context *sc, char **cause) memset(&ws, 0, sizeof ws); ws.ws_col = screen_size_x(&new_wp->base); ws.ws_row = screen_size_y(&new_wp->base); + ws.ws_xpixel = w->xpixel * ws.ws_col; + ws.ws_ypixel = w->ypixel * ws.ws_row; /* Block signals until fork has completed. */ sigfillset(&set); |