Font search

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-10-05 05:42:05 +03:00
parent 1414a66e56
commit 59acba3264
6 changed files with 603 additions and 545 deletions

View File

@@ -41,7 +41,7 @@ private:
auto init_signal() -> void;
auto init_theme_portal() -> void;
auto pump_events() -> void;
auto render_frame() -> void;
auto tick() -> void;
auto create_layer_surface() -> void;
auto destroy_layer_surface() -> void;
auto ensure_egl_surface() -> void;
@@ -60,7 +60,7 @@ private:
wl_compositor *compositor {};
wl_seat *seat {};
wl_keyboard *kbd {};
wl_surface *wl_surface {};
wl_surface *surface {};
zwlr_layer_shell_v1 *layer_shell {};
zwlr_layer_surface_v1 *layer_surface {};
ext_background_effect_manager_v1 *mgr {};
@@ -85,9 +85,9 @@ private:
struct {
TypingBuffer typing {};
xkb_context *xkb_ctx {};
xkb_keymap *xkb_keymap {};
xkb_state *xkb_state {};
xkb_context *xkb_ctx_v {};
xkb_keymap *xkb_keymap_v {};
xkb_state *xkb_state_v {};
std::unordered_set<u32> held;
std::unordered_set<u32> pressed_syms;
@@ -100,11 +100,11 @@ private:
auto is_down_sym(xkb_keysym_t sym) const -> bool
{
if (!xkb_state)
if (!xkb_state_v)
return false;
for (auto k : held) {
if (xkb_state_key_get_one_sym(
xkb_state, static_cast<xkb_keycode_t>(k + 8))
xkb_state_v, static_cast<xkb_keycode_t>(k + 8))
== sym)
return true;
}
@@ -123,9 +123,9 @@ private:
auto mod_active(char const *name) const -> bool
{
return xkb_state
return xkb_state_v
&& xkb_state_mod_name_is_active(
xkb_state, name, XKB_STATE_MODS_EFFECTIVE)
xkb_state_v, name, XKB_STATE_MODS_EFFECTIVE)
> 0;
}