Skip to content
Myr

wayland: select_hovered_match(): only refresh when selection changed

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 4e525fd · Browse files · 1 file+6 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−5 removed

  • other:+6 added−5 removed

1 file+6 added−5 removed

modified:wayland.c+6 added-5 removed
1125 unmodified lines
1126select_hovered_match(struct seat *seat, bool refresh_always)1127{1128 struct wayland *wayl = seat->wayl;11291130 bool refresh = false;11311130 ssize_t hovered_row = render_get_row_num(1131 wayl->render, wayl->width, seat->pointer.x, seat->pointer.y,1132 wayl->matches);11331134 if (hovered_row < 0)1135 return;11361139 refresh = matches_idx_select(wayl->matches, hovered_row);1137 if (hovered_row == matches_get_match_index(wayl->matches))1138 return;11391141 if (refresh_always || refresh)1142 wayl_refresh(wayl);1140 if (!matches_idx_select(wayl->matches, hovered_row))1141 return;11421143 wayl_refresh(wayl);1144}11451146static void1147wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,
2055 unmodified lines