aboutsummaryrefslogtreecommitdiffstats
path: root/menu.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-11-22 15:43:13 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-11-22 15:43:13 +0000
commit82901953d32cc52a688be47d0594e2df0395b2cc (patch)
tree6db2941dee3c2d7410eed8b20b57626649d474a3 /menu.c
parentNEWS: options: -N (diff)
downloadw3m-82901953d32cc52a688be47d0594e2df0395b2cc.tar.gz
w3m-82901953d32cc52a688be47d0594e2df0395b2cc.zip
[w3m-dev 03458] Re: mouse menu
* display.c (displayBuffer): nTab2 -> nTab, mouse_menu * fm.h (nTab2): deleted (MouseMenuMap): added (MouseMenu): added (LIMIT_MOUSE_MENU): added * func.c (initMouseMenu): delete mouse_menu_map initialization conv_from_system mouse_menu->width * main.c (main): mouse_menu->in_action = FALSE (posTab): check mouse_menu (mouse_menu_action): add y arg mouse_menu_width check (process_mouse): nTab2 -> nTab, mouse_menu (nTabLine): deleted (calcTabPos): check mouse_menu * menu.c (mainMn): x, y (selMn): mouse_menu check (tabMn): mosue_menu check * proto.h (nTabLine): deleted From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/menu.c b/menu.c
index f76777a..822d3d6 100644
--- a/menu.c
+++ b/menu.c
@@ -1,4 +1,4 @@
-/* $Id: menu.c,v 1.18 2002/11/15 15:36:48 ukai Exp $ */
+/* $Id: menu.c,v 1.19 2002/11/22 15:43:14 ukai Exp $ */
/*
* w3m menu.c
*/
@@ -1252,6 +1252,8 @@ mainMn(void)
Menu *menu = &MainMenu;
char *data;
int n;
+ int x = Currentbuf->cursorX + Currentbuf->rootX,
+ y = Currentbuf->cursorY + Currentbuf->rootY;
data = searchKeyData();
if (data != NULL) {
@@ -1260,8 +1262,13 @@ mainMn(void)
return;
menu = w3mMenuList[n].menu;
}
- popupMenu(Currentbuf->cursorX + Currentbuf->rootX,
- Currentbuf->cursorY + Currentbuf->rootY, menu);
+#ifdef USE_MOUSE
+ if (mouse_menu && mouse_menu->in_action) {
+ x = mouse_menu->cursorX - FRAME_WIDTH - 1;
+ y = mouse_menu->cursorY;
+ }
+#endif
+ popupMenu(x, y, menu);
}
/* --- MainMenu (END) --- */
@@ -1271,8 +1278,16 @@ mainMn(void)
void
selMn(void)
{
- popupMenu(Currentbuf->cursorX + Currentbuf->rootX,
- Currentbuf->cursorY + Currentbuf->rootY, &SelectMenu);
+ int x = Currentbuf->cursorX + Currentbuf->rootX,
+ y = Currentbuf->cursorY + Currentbuf->rootY;
+
+#ifdef USE_MOUSE
+ if (mouse_menu && mouse_menu->in_action) {
+ x = mouse_menu->cursorX - FRAME_WIDTH - 1;
+ y = mouse_menu->cursorY;
+ }
+#endif
+ popupMenu(x, y, &SelectMenu);
}
static void
@@ -1408,8 +1423,16 @@ smDelBuf(char c)
void
tabMn(void)
{
- popupMenu(Currentbuf->cursorX + Currentbuf->rootX,
- Currentbuf->cursorY + Currentbuf->rootY, &SelTabMenu);
+ int x = Currentbuf->cursorX + Currentbuf->rootX,
+ y = Currentbuf->cursorY + Currentbuf->rootY;
+
+#ifdef USE_MOUSE
+ if (mouse_menu && mouse_menu->in_action) {
+ x = mouse_menu->cursorX - FRAME_WIDTH - 1;
+ y = mouse_menu->cursorY;
+ }
+#endif
+ popupMenu(x, y, &SelTabMenu);
}
static void