awmaker/awmaker — pull request #3 by thekix (2014-08-19 23:55:37+00:00)
Title: Clip and Drawer own options menus

This patch creates own options menus for the Clip and for the Drawers.

There is a problem (bug) included in the patch
1c373cb8c4ca52358f79ae10fee0cf78e4ef3723
Title: DA: Clip and drawer menu always unmapped (warning)
that creates a common menu for the Clip and for the Drawer. Then, when
the user calls the Drawer menu (right click on Drawer) wmaker try to
call these lines:

static void updateClipOptionsMenu(WDock *dock)
{
...
if (!w_global.clip.opt_menu || !dock)
return;

For the Drawer, then, the function doesn't return, and wmaker crash
because the funcion at the end of this function:
wMenuRealize(w_global.clip.opt_menu);
calls the function wcore_map with a non initialized screen (screen_ptr is 0x0).

This patch split the common functions for Clip and Drawer, and the
problem is gone. The patch includes the new drawer_opt_menu variable
in the w_global variable. The variable is included in the Dock, because
is common for all drawers and drawers depends on Dock (no Dock, no Drawers).

This patch solves a BUG (wmaker crash).