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

Problem when using --scroll #85

Closed fredx181 closed 6 years ago

fredx181 commented 6 years ago

Hello Tomas, xlunch is basically very nice, but I'm having a problem when scrolling. Running applications from the first rows works fine, but when scrolling further towards the end (I have lots of applications) and mouse click on an icon, it doesn't run the application. Btw, I found that it does work OK when using only keyboard, pgup and pgdn and/or left/right arrow keys and then press Enter (no mouse scroll or click). I tested first on a Debian install with Openbox as window-manager and had this problem. But also tested now on Slax, (installed many applications), same problem for me.

Fred

PMunch commented 6 years ago

Looking at the code I think this is the offending line: https://github.com/Tomas-M/xlunch/blob/master/xlunch.c#L2032. Basically it breaks the loop after the first page of entries is checked, meant to speed up the execution by not checking all the entries. This was probably added before scrolling and was simply never removed.

fredx181 commented 6 years ago

@PMunch That works, problem is solved, many thanks ! (removed lines 2032-2034 and recompiled)

Looking at the code I think this is the offending line: https://github.com/Tomas-M/xlunch/blob/master/xlunch.c#L2032.

PMunch commented 6 years ago

Great to hear! Could you create a PR so we can merge and close this issue?

fredx181 commented 6 years ago

Could you create a PR so we can merge and close this issue?

Perhaps better if you or someone else does it, I'm not experienced with that, sorry.

PMunch commented 6 years ago

Always time to learn :) It's fairly simple, just hit the fork button on GitHub, then clone that repo to your machine. Make the changes, and don't forget to update the patch number in the version (at the top of the file), then create a commit and push it to GitHub. Then back on GitHub go to this repo and hit "New pull request", you probably also have to hit the blue link called "compare across forks". Then just choose your repo and your branch, type in a description and send it.

Of course if you're not up for it I can do it as well :)

fredx181 commented 6 years ago

Ok, created PR now, thanks for explaining ! I learned something :) Tell me if somethings wrong the way I did and I'll try to fix it.

EDIT: Btw, not sure if it's related with this scroll fix, but one annoying thing is, if using --voidclickterminate, scroll a little down, then left-click in an empty space (just above app icon) it runs an app instead of quitting (what should happen when --voidclickterminate is used). Hope I'm saying this clearly, english is not my language. But probably this is a different issue.

Fred

PMunch commented 6 years ago

--voidclickterminate is supposed to just close xlunch if you click anywhere that is not an icon or a button. If it runs an application that is not highlighted when you left-click that is a bug, but as you say it's probably not related to this, so create a separate issue for it.

Tomas-M commented 6 years ago

Thank you both very much for fixing the scroll issue.

Just a kind request, please do not modify version numbers in patches or PR or in any way, since there is a "make release" target which asks for new version number and then it patches all files needed and publishes the release in github, including creation of a tag as well. Thank you.

PMunch commented 6 years ago

Oh sorry, forgot about that. My bad for telling you do do so @fredx181