Wed May 3 21:04:37 PDT 2000 Michael Jennings <mej@eterm.org>
Fixed a bug in the handling of resize events thanks to a tip from Teodor Zlatanov <tzz@iglou.com>. While I was at it, I also fixed a couple remaining issues with the popup menu system. You shouldn't get any more cases where items remain selected after you've moved your mouse off of the menu, or where a submenu would stay up even though another menuitem is selected. SVN revision: 2594
This commit is contained in:
parent
8d2b2125c3
commit
e6facd5833
10
ChangeLog
10
ChangeLog
|
@ -3543,3 +3543,13 @@ Tue May 2 16:56:47 PDT 2000 Michael Jennings <mej@eterm.org>
|
|||
Yeah, right. =P
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Wed May 3 21:04:37 PDT 2000 Michael Jennings <mej@eterm.org>
|
||||
|
||||
Fixed a bug in the handling of resize events thanks to a tip from
|
||||
Teodor Zlatanov <tzz@iglou.com>. While I was at it, I also fixed a
|
||||
couple remaining issues with the popup menu system. You shouldn't
|
||||
get any more cases where items remain selected after you've moved your
|
||||
mouse off of the menu, or where a submenu would stay up even though
|
||||
another menuitem is selected.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
11
src/events.c
11
src/events.c
|
@ -484,16 +484,19 @@ handle_focus_out(event_t * ev)
|
|||
unsigned char
|
||||
handle_configure_notify(event_t * ev)
|
||||
{
|
||||
XEvent unused_xevent;
|
||||
XEvent xevent;
|
||||
|
||||
D_EVENTS(("handle_configure_notify(ev [%8p] on window 0x%08x)\n", ev, ev->xany.window));
|
||||
|
||||
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &primary_data), 0);
|
||||
|
||||
while (XCheckTypedWindowEvent(Xdisplay, ev->xany.window, ConfigureNotify, &unused_xevent));
|
||||
while (XCheckTypedWindowEvent(Xdisplay, ev->xany.window, ConfigureNotify, ev)) {
|
||||
D_EVENTS(("New event: Window 0x%08x, %dx%d at %d, %d\n", ev->xany.window, ev->xconfigure.width,
|
||||
ev->xconfigure.height, ev->xconfigure.x, ev->xconfigure.y));
|
||||
}
|
||||
if (ev->xany.window == TermWin.parent) {
|
||||
int x = ev->xconfigurerequest.x, y = ev->xconfigurerequest.y;
|
||||
unsigned int width = ev->xconfigurerequest.width, height = ev->xconfigurerequest.height;
|
||||
int x = ev->xconfigure.x, y = ev->xconfigure.y;
|
||||
unsigned int width = ev->xconfigure.width, height = ev->xconfigure.height;
|
||||
|
||||
D_EVENTS((" -> TermWin.parent is %ldx%ld at (%d, %d). Internal cache data shows %dx%d at (%hd, %hd). send_event is %d\n",
|
||||
width, height, x, y, szHint.width, szHint.height, TermWin.x, TermWin.y, ev->xconfigure.send_event));
|
||||
|
|
|
@ -357,6 +357,9 @@ menu_handle_motion_notify(event_t * ev)
|
|||
current_menu->state |= MENU_STATE_IS_DRAGGING;
|
||||
}
|
||||
item = find_item_by_coords(current_menu, ev->xbutton.x, ev->xbutton.y);
|
||||
if (!item || item != menuitem_get_current(current_menu)) {
|
||||
menu_reset_submenus(current_menu);
|
||||
}
|
||||
menuitem_change_current(item);
|
||||
} else {
|
||||
/* Motion outside the current menu */
|
||||
|
@ -383,6 +386,8 @@ menu_handle_motion_notify(event_t * ev)
|
|||
menu_reset_submenus(current_menu);
|
||||
}
|
||||
menuitem_change_current(item);
|
||||
} else if (!menu) {
|
||||
menuitem_change_current(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue