[w3m-dev-en 00024] Re: 0.1.6: MENU_CANCEL

From: hsaka@mth.biglobe.ne.jp
Date: Sun Jan 23 2000 - 19:55:50 CST


Hello.
I implemented almost code for the menu except the code for GPM.

The behavior in an xterm is NOT a bug.
If the function action_menu() returns zero, the current menu is closed
because the processing escapes from `while' loop in popup_menu().
In the case of MENU_CANCEL, action_menu() returns zero without any action.
The last part of action_menu() can be written in detail.

  } else if (select == MENU_CLOSE) {
    if (menu->parent != NULL)
       menu->parent->active = 0;
/* for MENU_CANCEL */
  } else if (select == MENU_CANCEL) {
  }
  return(0);

I don't have/use GPM, please fix the behavior under GPM.

>> From: w3m-dev-en@mips.rhein-neckar.de
>> Sender: naddy@mips.rhein-neckar.de
>>
>> If w3m runs in an xterm and a menu is popped up, clicking outside
>> the menu will close it.
>>
>> This doesn't work on the console with GPM (or sysmouse). Clicks
>> outside the menu are simply ignored.
>>
>> process_mMouse() checks whether the position was inside the active
>> menu and returns MENU_CANCEL if not. However, there is no check
>> for MENU_CANCEL in all the code. Thus, I am not surprised that no
>> action is taken under GPM. I don't understand why the menu is closed
>> in an xterm, though. This seems to happen "by accident". What is the
>> code path?
>>
>> I suspect that the failure to check for MENU_CANCEL is actually a
>> bug which just happened to go unnoticed due to the behavior being
>> accidentally as expected in an xterm.
-----------------------------------
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
 http://www2u.biglobe.ne.jp/~hsaka/



This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:43 CDT