♻️ Refactor rendering functions#280
Conversation
0e31b29 to
d211903
Compare
| for plugin_channel in &self.plugin_channels { | ||
| let message_result = plugin_channel.try_recv(); | ||
| if message_result.is_err() { | ||
| continue; |
d211903 to
4ec46a2
Compare
4ec46a2 to
46b3e13
Compare
|
Hey @Ciantic, I just noticed that wayapp is appearently missing functionality to press-and-HOLD keys. When I type something and hold backspace to delete what I typed, it just deletes one character. |
|
@friedow interesting, I have to investigate, to me holding backspace works like I expect it to. It repeats normally. Note that current wayapp git repo has IME functionality builtin, this affect with the keyboard somehow. |
Oh interesting, I don't know how IME works but I imagine that either your keyboard or you compositor / window manager does the repeating for you. What desktop stack are you running? I'm running a pretty barebones niri & NixOS setup setup. |
|
@friedow I have KDE, but I have found one bug at least, when alt tabbing to the window, backspace and arrows stop working, but inputting letters work. Arrows start working again if I re-activate text input with mouse. So there is some weirdness here. |
|
@friedow Did you use git version of wayapp? I pushed git change to disable IME, it was causing the issue I was just experiencing. |
| match active_entry { | ||
| Some(entry) => Some(&entry.id), | ||
| None => None, | ||
| fn active_plugin(&self) -> Option<&model::Plugin> { |
There was a problem hiding this comment.
What if Plugin implemented into Iter? They seem to be made for it. We wouldn't have next_plugin, but plugin.next() and also plugin.last().
We can do that in a follow up.
This changes how centerpiece tracks the selection of entries. The selection state was previously implemented using an active_entry_index as a plain integer. This was problematic if plugins in front of the cursor changed the number of entries they provide, effectively moving the cursor. This PR fixes this by changing the selection state to an active_plugin_id and an active_entry_id instead of using an index.
Furthermore, this PR sets a fixed height for all entries and plugin headers. This fixes rendering issues with inconsistent window heights.