Ticket #3722 (closed defect: fixed)

Opened 8 years ago

Last modified 5 years ago

Double clicking on empty area executes last item

Reported by: egmont Owned by: andrew_b
Priority: major Milestone: 4.8.25
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Forking from #3715:

Go to a directory which has fewer entries than the height of the panel widget.

Double click on the empty area at the bottom.

Actual behavior: The last item is executed (if executable) or entered (if directory or archive).

Expected behavior: Nothing (other than the last item getting selected on the first click).

Unexpected execution of a binary can potentially be quite dangerous, and it's sure unexpected to execute it if you double clicked somewhere else.

(Similary I'm wondering whether the leftmost and rightmost columns (the borders which aren't highlighted) should be excluded as well.)

Change History

comment:1 Changed 8 years ago by and

Yes makes sense to prevent execute of last element BY ACCIDENT of an inexperienced user.

comment:2 Changed 8 years ago by mooffie

The patch--

  • probably fails for "brief" listing.
  • doesn't address egmont's note about excluding left/right borders.
  • could have been nicer if it factored out MSG_MOUSE_DRAG's code for figuring out a file index from coordinates.

comment:3 Changed 8 years ago by and

Thanks mooffie, can you test next patch?

comment:4 Changed 8 years ago by mooffie

Have you considered idea #3 in my previous comment?

Some day we'll support drag & drop and then what? Will we duplicate these calculations for the 3rd time?

While MSG_MOUSE_DRAG also needs to know when the mouse cursor it outside the files, perhaps we can still share the code in a way that isn't inelegant.

comment:5 Changed 8 years ago by and

Honestly I was focused on MSG_MOUSE_CLICK bug fixing because I can reproduce egmonts findings about "Double clicking".

I don't want touch MSG_MOUSE_DRAG (and maybe break it) by fixing "double clicking" here.

comment:6 Changed 5 years ago by andrew_b

Branch: 3722_double_click_on_empty
changeset:19528f371e9b5acc2377a2e91d4e0dc72c9d480a

Version 0, edited 5 years ago by andrew_b (next)

comment:7 Changed 5 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Branch state changed from no branch to on hold

comment:8 Changed 5 years ago by andrew_b

  • Branch state changed from on hold to on review
  • Milestone changed from Future Releases to 4.8.25

comment:9 Changed 5 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:10 Changed 5 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:11 Changed 5 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.