mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-26 01:40:12 -05:00
Merge branch 'master' into bindings
This commit is contained in:
commit
2be999a752
5 changed files with 21 additions and 9 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -2,10 +2,20 @@
|
|||
|
||||
## Unreleased
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
* Changed icon name in `foot.desktop` and `foot-server.desktop` from
|
||||
_terminal_ to _utilities-terminal_.
|
||||
* `XDG_SESSION_ID` is now included in the server/daemon default socket
|
||||
path.
|
||||
|
||||
### Deprecated
|
||||
### Removed
|
||||
|
||||
### Fixed
|
||||
* Window size doubling when moving window between outputs with
|
||||
different scaling factors (https://codeberg.org/dnkl/foot/issues/3).
|
||||
|
||||
### Security
|
||||
|
||||
## 1.2.1
|
||||
|
|
|
|||
4
client.c
4
client.c
|
|
@ -34,7 +34,7 @@ print_usage(const char *prog_name)
|
|||
printf("Options:\n");
|
||||
printf(" -t,--term=TERM value to set the environment variable TERM to (foot)\n"
|
||||
" --login-shell start shell as a login shell\n"
|
||||
" -s,--server-socket=PATH path to the server UNIX domain socket (default=XDG_RUNTIME_DIR/foot.sock)\n"
|
||||
" -s,--server-socket=PATH path to the server UNIX domain socket (default=$XDG_RUNTIME_DIR/foot-$XDG_SESSION_ID.sock)\n"
|
||||
" -l,--log-colorize=[never|always|auto] enable/disable colorization of log output on stderr\n"
|
||||
" -v,--version show the version number and quit\n");
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ main(int argc, char *const *argv)
|
|||
if (connect(fd, (const struct sockaddr *)&addr, sizeof(addr)) == 0)
|
||||
connected = true;
|
||||
else
|
||||
LOG_WARN("%s/foot.sock: failed to connect, will now try /tmp/foot.sock", xdg_runtime);
|
||||
LOG_WARN("%s: failed to connect, will now try /tmp/foot.sock", addr.sun_path);
|
||||
}
|
||||
|
||||
if (!connected) {
|
||||
|
|
|
|||
13
shm.c
13
shm.c
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/memfd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
@ -104,7 +105,7 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie)
|
|||
*/
|
||||
|
||||
int pool_fd = -1;
|
||||
void *mmapped = NULL;
|
||||
void *mmapped = MAP_FAILED;
|
||||
size_t size = 0;
|
||||
|
||||
struct wl_shm_pool *pool = NULL;
|
||||
|
|
@ -142,9 +143,9 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie)
|
|||
}
|
||||
}
|
||||
|
||||
mmapped = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, pool_fd, 0);
|
||||
mmapped = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_UNINITIALIZED, pool_fd, 0);
|
||||
if (mmapped == MAP_FAILED) {
|
||||
LOG_ERR("failed to mmap SHM backing memory file");
|
||||
LOG_ERRNO("failed to mmap SHM backing memory file");
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +164,7 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie)
|
|||
|
||||
/* We use the entire pool for our single buffer */
|
||||
wl_shm_pool_destroy(pool); pool = NULL;
|
||||
close(pool_fd);
|
||||
close(pool_fd); pool_fd = -1;
|
||||
|
||||
/* One pixman image for each worker thread (do we really need multiple?) */
|
||||
pix = pixman_image_create_bits_no_clear(
|
||||
|
|
@ -198,9 +199,11 @@ err:
|
|||
wl_shm_pool_destroy(pool);
|
||||
if (pool_fd != -1)
|
||||
close(pool_fd);
|
||||
if (mmapped != NULL)
|
||||
if (mmapped != MAP_FAILED)
|
||||
munmap(mmapped, size);
|
||||
|
||||
/* We don't handle this */
|
||||
abort();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ term_set_fonts(struct terminal *term, struct font *fonts[static 4])
|
|||
term->fonts[0]->ascent + term->fonts[0]->descent);
|
||||
LOG_INFO("cell width=%d, height=%d", term->cell_width, term->cell_height);
|
||||
|
||||
render_resize_force(term, term->width, term->height);
|
||||
render_resize_force(term, term->width / term->scale, term->height / term->scale);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,6 @@ static const struct wp_presentation_listener presentation_listener = {
|
|||
.clock_id = &clock_id,
|
||||
};
|
||||
|
||||
|
||||
static bool
|
||||
verify_iface_version(const char *iface, uint32_t version, uint32_t wanted)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue