diff --git a/fvwm/menus.c b/fvwm/menus.c index 520befa05..ed7fcd0dd 100644 --- a/fvwm/menus.c +++ b/fvwm/menus.c @@ -7557,184 +7557,3 @@ char *get_menu_options( return action; } - -/* ---------------------------- new menu loop code ------------------------- */ - -#if 0 -/*!!!*/ -typedef enum -{ - MTR_XEVENT = 0x1, - MTR_FAKE_ENTER_ITEM = 0x2, - MTR_PROPAGATE_XEVENT_UP = 0x4, - MTR_PROPAGATE_XEVENT_DOWN = 0x8, - MTR_POPUP_TIMEOUT = 0x10, - MTR_POPDOWN_TIMEOUT = 0x20 -} mloop_trigger_type_t; - -typedef_struct -{ - mloop_trigger_type_t type; - XEvent trigger_ev; - int ticks_passed; -} mloop_trigger_t; - -typedef_struct -{ - int popup_10ms; - int popdown_10ms; -} mloop_timeouts_t; - -typedef struct -{ - MenuRoot *current_menu; - XEvent *in_ev; - struct - { - unsigned do_fake_enter_item : 1; - unsigned do_propagete_event_up : 1; - unsigned do_propagete_event_down : 1; - } flags; -} mloop_get_trigger_input_t; - -/*!!!static*/ -mloop_trigger_type_t __mloop_get_trigger( - mloop_trigger_t *ret_trigger, mloop_timeouts_t *io_timeouts, - const mloop_get_trigger_input_t * const in, - { - if (in_out->in_flags->do_propagate_event_down) - { - return MTR_PROPAGATE_XEVENT_DOWN; - } - else if (in_out->in_flags->do_propagate_event_up) - { - if (a != b) - { - return MTR_PROPAGATE_XEVENT_UP; - } - else - { - } - /*!!!return propagate up*/ - /*!!!*/ - } - /*!!!read event or wait for timeout*/ - while (0/*!!!not finished*/) - { - /*!!!rc = 0*/ - if (0/*!!!wait for tiomeout*/) - { - /*!!!check for event*/ - } - else - { - /*!!!block for event*/ - } - if (0/*got event*/) - { - /*!!!rc = MTR_XEVENT*/ - } - if (0/*!!!popup timed out;break*/) - { - /*!!!rc = MTR_POPUP;break*/ - } - if (0/*!!!popdown timed out;break*/) - { - /*!!!rc = MTR_POPDOWN;break*/ - } - /*!!!sleep*/ - } - if (0/*!!!rc == MTR_XEVENT && evtype == MotionNotify*/) - { - /*!!!eat up further MotionNotify events*/ - } - - return 0/*!!!rc*/; - } - - /*!!!static*/ - void __menu_loop_new( - MenuParameters *pmp, MenuReturn *pmret, double_keypress *pdkp) - { - mloop_evh_input_t mei; -#if 0 - mloop_ret_code_t mloop_ret; -#endif - mloop_evh_data_t med; - mloop_static_info_t msi; - MenuOptions mops; - Bool is_finished; - - /*!!!init menu loop*/ - __mloop_init(pmp, pmret, &mei, &med, &msi, &mops); - for (is_finished = False; !is_finished; ) - { - mloop_trigger_type_t mtr; - - mtr = __mloop_get_trigger( - pmp, pmret, &mei, &med, &msi); - switch (mtr) - { - case MTR_XEVENT: - /*!!!handle event*/ - break; - case MTR_FAKE_ENTER_ITEM: - /*!!!fake enter item*/ - break; - case MTR_PROPAGATE_XEVENT_UP: - /*!!!handle propagation*/ - break; - case MTR_PROPAGATE_XEVENT_DOWN: - /*!!!handle propagation*/ - break; - case MTR_POPUP_TIMEOUT: - /*!!!handle popup*/ - break; - case MTR_POPDOWN_TIMEOUT: - /*!!!handle popdown*/ - break; - } - - - - - -#if 0 - mloop_ret = __mloop_handle_event( - pmp, pmret, pdkp, &mei, &med, &msi); - switch (mloop_ret) - { - case MENU_MLOOP_RET_LOOP: - continue; - case MENU_MLOOP_RET_END: - is_finished = True; - break; - default: - break; - } - /* Now handle new menu items, whether it is from a - * keypress or a pointer motion event. */ - if (med.mi != NULL) - { - mloop_ret = __mloop_handle_action_with_mi( - pmp, pmret, pdkp, &mei, &med, &msi, - &mops); - } - else - { - mloop_ret = __mloop_handle_action_without_mi( - pmp, pmret, pdkp, &mei, &med, &msi, - &mops); - } - if (mloop_ret == MENU_MLOOP_RET_END) - { - is_finished = True; - } - XFlush(dpy); -#endif - } - __mloop_exit(pmp, pmret, pdkp, &mei, &med, &msi, &mops); - - return; - } -#endif