mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Fixed mouse handling in WPanel widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
a878a2dd37
commit
3b86ee7808
@ -3480,7 +3480,7 @@ mark_if_marking (WPanel * panel, Gpm_Event * event)
|
||||
*/
|
||||
|
||||
static void
|
||||
mouse_sort_col (Gpm_Event * event, WPanel * panel)
|
||||
mouse_sort_col (WPanel * panel, int x)
|
||||
{
|
||||
int i;
|
||||
const char *lc_sort_name = NULL;
|
||||
@ -3491,7 +3491,7 @@ mouse_sort_col (Gpm_Event * event, WPanel * panel)
|
||||
for (i = 0, format = panel->format; format != NULL; format = format->next)
|
||||
{
|
||||
i += format->field_len;
|
||||
if (event->x < i + 1)
|
||||
if (x < i + 1)
|
||||
{
|
||||
/* found column */
|
||||
lc_sort_name = format->title;
|
||||
@ -3595,7 +3595,7 @@ do_panel_event (Gpm_Event * event, WPanel * panel, gboolean * redir)
|
||||
/* sort on clicked column; don't handle wheel events */
|
||||
if (mouse_down && (local.buttons & (GPM_B_UP | GPM_B_DOWN)) == 0 && local.y == 2)
|
||||
{
|
||||
mouse_sort_col (event, panel);
|
||||
mouse_sort_col (panel, local.x);
|
||||
return MOU_NORMAL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user