From 7756d7f462b1223f253805967118e08224ff9aaf Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Thu, 23 Jun 2022 10:15:28 +0100 Subject: Allow percentages for window size & margins. --- src/tofi.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/tofi.h') diff --git a/src/tofi.h b/src/tofi.h index 63d9e6b..be4e750 100644 --- a/src/tofi.h +++ b/src/tofi.h @@ -10,7 +10,7 @@ #include "wlr-layer-shell-unstable-v1.h" struct tofi { - /* Globals */ + /* Wayland globals */ struct wl_display *wl_display; struct wl_registry *wl_registry; struct wl_compositor *wl_compositor; @@ -19,13 +19,20 @@ struct tofi { struct wl_shm *wl_shm; struct zwlr_layer_shell_v1 *zwlr_layer_shell; - /* Objects */ + /* Wayland objects */ struct wl_keyboard *wl_keyboard; struct wl_pointer *wl_pointer; + /* Keyboard objects */ + struct xkb_state *xkb_state; + struct xkb_context *xkb_context; + struct xkb_keymap *xkb_keymap; + /* State */ bool submit; bool closed; + int32_t output_width; + int32_t output_height; struct { struct surface surface; struct zwlr_layer_surface_v1 *zwlr_layer_surface; @@ -40,13 +47,8 @@ struct tofi { int32_t margin_right; } window; - /* Keyboard state */ - struct xkb_state *xkb_state; - struct xkb_context *xkb_context; - struct xkb_keymap *xkb_keymap; - /* Options */ - int anchor; + int8_t anchor; bool hide_cursor; }; -- cgit v1.2.3