Skip to content

Commit

Permalink
Remove never finished menu loop rewrite.
Browse files Browse the repository at this point in the history
  • Loading branch information
domivogt committed Nov 21, 2021
1 parent bf5620c commit d789406
Showing 1 changed file with 0 additions and 181 deletions.
181 changes: 0 additions & 181 deletions fvwm/menus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d789406

Please sign in to comment.