1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-03-17 17:14:42 -04:00

[Click to select] Only select visible boxes.

This commit is contained in:
QC 2014-08-24 11:24:35 +02:00
parent ba6a055683
commit 02ef657c41

View file

@ -1279,6 +1279,11 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
else {
for ( int i = 0; i < max_elements; i++ ) {
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;
update = TRUE;
if ( ( xbe->time - last_press ) < 200 ) {