diff options
author | Phil Jones <philj56@gmail.com> | 2022-06-23 10:15:28 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-06-23 10:15:28 +0100 |
commit | 7756d7f462b1223f253805967118e08224ff9aaf (patch) | |
tree | 00140512a07905aa578865240a613a623082508d /src/tofi.h | |
parent | c149768f888efbf9ab237730280402bd607894ac (diff) |
Allow percentages for window size & margins.
Diffstat (limited to 'src/tofi.h')
-rw-r--r-- | src/tofi.h | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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; }; |