Tomas-M / xlunch

Graphical app launcher for X with minimal dependencies
http://xlunch.org
GNU General Public License v3.0
219 stars 37 forks source link

When using search, only first number of items can be selected #90

Closed fredx181 closed 6 years ago

fredx181 commented 6 years ago

When I type something at the prompt, only a couple of apps can be selected with mouse (first items). Using keyboard is OK. It depends on what is typed and (maybe?) the amount of apps that are in the list. Should be reproducible by typing something and try to select the last few items with mouse, I think.

Fred

fredx181 commented 6 years ago

Looks like it still has to do with scrolling and specially with this:

index > scrolled_past*columns && index < scrolled_past*columns + rows*columns +1

I tried a lot, but can't make it right. Any help ? Or is xlunch on vacation :)

Tomas-M commented 6 years ago

I was able to reproduce the problem, when I filter icons and the result is several rows of icons, nothing from the last row can be clicked to start the app. Even mouse hover does not highlight the items. I am not sure how to fix that though.

fredx181 commented 6 years ago

Ah, yes, glad you could reproduce also. The --scroll option from @PMunch is a really great addition to xlunch, but has its complications (one bug fixed can lead to another), hopefully he can fix this problem again :)

PMunch commented 6 years ago

Hmm, what options are you using? I just tried it with a freshly compiled version from this repo and I'm unable to reproduce..

fredx181 commented 6 years ago

It happens when I use just --scroll, but also with --scroll --windowed. Using entries file in /etc/xlunch/entries.dsv I has over 100 entries (maybe has to do with the amount of entries that you couldn't reproduce the problem (just guessing ?))

PMunch commented 6 years ago

I have 200 entries in my entries file, so I doubt that that is the issue.. Is scroll the only flag you use when this happens? And are you running on the latest version? What is the output of xlunch --version?

fredx181 commented 6 years ago

Yes, using latest version.

root@live:~# xlunch --version
xlunch graphical program launcher, version 3.2.11

I always use scroll, so I didn't test earlier, but found now that it happens also without using --scroll.
So in fact the problem is always, it makes no difference which flags I use AFAIK.
Just in case there's confusion about what's the problem exactly, here's animated image:
xlunchdemo As you can see after typing "you", only the first of four items can be selected (and only the first does run when clicking on it). But it depends, if I type just "y" then I get much more results, and the last couple of items cannot be selected.

EDIT: For what it's worth, just mentioning: It looks like that only the apps can be selected (after search) that were initially on the first page of entries. For example, when I use --rows 7, I can select the first 2 items (when typing "you" again). The second search result did show on the first page of entries (before doing search) now because of the 7 rows. EDIT2: When I use extreme amount --rows 20, (looks bad of course, but just to test) I can select and run all 4 items (after search) instead of only one when rows are 4

PMunch commented 6 years ago

Aha, I completely misunderstood your issue and I can confirm that this happens on my setup as well. I'll look into it.

PMunch commented 6 years ago

Fixed this issue in https://github.com/Tomas-M/xlunch/commit/dca9e8740b22f44dcb3e5412958a6d1dbab4eb50, will create a new patch if you can confirm that it works for you.

fredx181 commented 6 years ago

Thanks!! Yes, I tested, it's fixed now.

Maybe I should open new issue (I don't want to be pushy by opening too much issues, but tell me if it's better and I'll do). Possibly related to this issue, not sure. Again attached gif image to show better a bit weird behavior (however not a big problem): What I did:

xlunchdemo

EDIT: In my opinion, it would be the best if xlunch "resets" to the complete entries list after running an application from filtered items.

Tomas-M commented 6 years ago

EDIT: In my opinion, it would be the best if xlunch "resets" to the complete entries list after running an application from filtered items.

It looks like it does exactly that - resets to complete list of entries. It just needs to refresh (invalidate entire screen so it redraws). I forgot how to do it. @PMunch please help :)

PMunch commented 6 years ago

Ouch, yeah that's a simple redraw bug, should be an easy fix.

PMunch commented 6 years ago

Fixed in https://github.com/Tomas-M/xlunch/commit/1f7adf0724986aea94ee8bea00c26ff99e6b05bf