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

Launching app unintended when clicking on empty space #87

Closed fredx181 closed 6 years ago

fredx181 commented 6 years ago

If you have a large list of apps and use --scroll to get to the next rows, pages. Let's say the fist two rows are: a b c d e f g h Scroll one row down, so row: a b c d is not visible anymore and now the top row is: e f g h Then click in empty space (nothing highlighted), e.g. just above "g" and (the above) application "c" launches for me, unintended of course. I use --voidclickterminate to quit xlunch, so in above case that doesn't work. But also without --voidclickterminate, and left-clicking, the same thing happens.

EDIT: Btw, at the bottom of a page the same problem occurs, i.e. launching "invisible, not highlighted" app by left-click.

Fred

PMunch commented 6 years ago

Ah, what's happening is that it is not disregarding entries that are off-screen. What we probably should do is take this line https://github.com/Tomas-M/xlunch/blob/master/xlunch.c#L1975 and move it into the mouse_over_cell check so that all the places that are currently using mouse_over_cell does not consider entries that are off-screen.

fredx181 commented 6 years ago

Although I'd love to contribute to this great program e.g. by testing, I'm really not a C programmer. Tried to understand what you suggested and did experiment some, but no success. (your earlier suggestion (yesterday) was easier to do, just delete a few lines, piece of cake :) )

Fred

PMunch commented 6 years ago

What I meant was basically this: https://github.com/Tomas-M/xlunch/commit/764a3c9cd99fbb1c226d6dd4798ea0e2799160e3. Moving the check for if the cell is outside the currently in-view page of entries to the mouse_over_cell so it applies anywhere it is used. This should fix this issue, could you test and report back?

fredx181 commented 6 years ago

Great ! I can confirm that it's fixed now. The problems when using --scroll are all solved, thanks a lot !

Fred

PMunch commented 6 years ago

Great to hear!