From 498ee253da05420846dbd1183b33fe1259513358 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Tue, 12 Jun 2012 17:44:39 +0400 Subject: [PATCH] Menubar: ignore GPM_UP event. Signed-off-by: Andrew Borodin --- lib/widget/menu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/widget/menu.c b/lib/widget/menu.c index cadf03b3c..34a79d751 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -2,9 +2,12 @@ Pulldown menu code Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2007, 2009, 2011 + 2007, 2009, 2011, 2012 The Free Software Foundation, Inc. + Written by: + Andrew Borodin , 2012 + This file is part of the Midnight Commander. The Midnight Commander is free software: you can redistribute it @@ -602,6 +605,9 @@ menubar_event (Gpm_Event * event, void *data) if (!menubar->is_active && ((event->buttons & (GPM_B_MIDDLE | GPM_B_UP | GPM_B_DOWN)) != 0)) return MOU_NORMAL; + if (event->y == 1 && (event->type & GPM_UP) != 0) + return MOU_NORMAL; + if (!menubar->is_dropped) { menubar->previous_widget = dlg_get_current_widget_id (menubar->widget.owner); @@ -613,9 +619,6 @@ menubar_event (Gpm_Event * event, void *data) /* Mouse operations on the menubar */ if (event->y == 1 || !was_active) { - if ((event->type & GPM_UP) != 0) - return MOU_NORMAL; - /* wheel events on menubar */ if (event->buttons & GPM_B_UP) menubar_left (menubar);