mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-24 17:16:46 -04:00
[Click to select] Only select visible boxes.
This commit is contained in:
parent
ba6a055683
commit
02ef657c41
1 changed files with 5 additions and 0 deletions
|
@ -1279,6 +1279,11 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
||||||
else {
|
else {
|
||||||
for ( int i = 0; i < max_elements; i++ ) {
|
for ( int i = 0; i < max_elements; i++ ) {
|
||||||
if ( ( xbe->window ) == ( boxes[i]->window ) ) {
|
if ( ( xbe->window ) == ( boxes[i]->window ) ) {
|
||||||
|
// Only allow items that are visible to be selected.
|
||||||
|
if ( ( last_offset + i ) < 0 || ( last_offset + i ) >= filtered_lines ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//
|
||||||
selected = last_offset + i;
|
selected = last_offset + i;
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
if ( ( xbe->time - last_press ) < 200 ) {
|
if ( ( xbe->time - last_press ) < 200 ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue