From 63de05a5851fb8609e7d2c896c98b6d08346c037 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sat, 3 Mar 2007 12:44:45 +0000 Subject: [PATCH] menu_handler: Don't call get_parent_ptr for redraw events Only call get_parent_ptr for resize events so that the menu isn't moved to the cursor position for normal redraw events. Without this change, if ui.leds.enable and ui.clock.enable are 1 and the user opens the tab menu, it first appears near the tab bar and almost immediately jumps near the cursor. With this change, the tab menu stays near the tab bar. However, if the user presses Ctrl+L, then the menu still jumps; but that is less annoying than having it jump on its own. [ From commit 1a89589b13bf34e85a445ae7ba84602bc0522f81 in ELinks 0.12.GIT. --KON ] --- src/bfu/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bfu/menu.c b/src/bfu/menu.c index 76f1e8a58..792db073b 100644 --- a/src/bfu/menu.c +++ b/src/bfu/menu.c @@ -867,8 +867,8 @@ menu_handler(struct window *win, struct term_event *ev) switch (ev->ev) { case EVENT_INIT: case EVENT_RESIZE: - case EVENT_REDRAW: get_parent_ptr(win, &menu->parent_x, &menu->parent_y); + case EVENT_REDRAW: count_menu_size(win->term, menu); /* do_menu sets menu->selected = 0. If that * item isn't actually selectable, correct