WPrefs: fix key capture

This patch is used to fix the Debian bug #140181

It updates the NumLockMask function to report the mask and
call XFreeModifiermap when needed.
It also modifies capture_shortcut function to be able to use Super keys
and report numeric keypad when pressed (aka now detects correctly
if the numlock is enabled or not).
wmaker: update docked application balloon text

This patch is displaying the number of application instance
run directly in the balloon text (and I also run checkpatch.pl).
wmaker: fix src/dock.c code typo

This patch is renaming the colectIconsCallback name function.

THIS PATCH WAS MODIFIED BY Rodolfo García Peñas (kix) because cannot be
applied in the awmaker git without changes. This patch is based in the
original patch created by David Maciejak <david.maciejak@gmail.com>
wmaker: src/action.c merge duplicate code

This patch is merging some duplicate code related
to animation position.

THIS PATCH WAS MODIFIED BY Rodolfo García Peñas (kix) because cannot be
applied in the awmaker git without changes. This patch is based in the
original patch created by David Maciejak <david.maciejak@gmail.com>
WINGs: merge duplicate code from wtext

This patch is saving about 30 duplicate code lines from
WMPrependTextBlock and WMAppendTextBlock to create
a static fct called prepareTextBlock.
wmaker: fix deiconify window on double-click

This patch is fixing the RenderBadPicture X errors on deiconifying
window using double-click.

Background:

I also experienced this issue these days, after checking it was not
introduce with latest apercu feature I decided to dig into it.
As far as I saw in the archive it was first reported by Rodolfo in June 2012.

Each time a window is deiconify using double-click, the error below
is reported in the session error log:
wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
        Request code: 152
        Request minor code: 7
        Resource ID: 0x6000a4
        Error serial: 9269

So I decided to track when the issue is happening,
from src/action.c wDeiconifyWindow then in src/icon.c wIconDestroy
then in src/wcore.c wCoreDestroy.
At that stage, all the structures I checked are cleaned up properly
during the icon destroy process.

So I also checked when the issue is generated, I ended in
wrlib/xutil.c RCreateXImage (in the share memory extension code)

             XSync(context->dpy, False);
             oldErrorHandler = XSetErrorHandler(errorHandler);
             XShmAttach(context->dpy, &rximg->info);
             XSync(context->dpy, False);
             XSetErrorHandler(oldErrorHandler);

At this point I was quite lost, cause it means the error could
have been in the server error queue already.

Facts, seems the issue is appearing only on double-clicking the miniwindow,
but not when "Deminiaturize" is clicked from the right-click contextual menu.
I also checked the code from winmenu.c when the action MC_MINIATURIZE
is selected from execMenuCommand fct, but it was just calling
wDeiconifyWindow function. Hum.

So, after one full day of thought I tested to just change the focus before
double-clicking the miniwindow, and bingo it works.
That means when the icon is destroyed the X server still has a reference
on it that's generating the issue.
wmaker: fix control shortcut label in window menu

This patch is fixing the shortcut label used in window menu.
As now when a 'control' shortcut was used, the label displayed
was 'bug' cause GetShortcutString fct which is calling wXModifierFromKey
fct was waiting for a 'Control' static string not the default one
set to 'Ctrl' string.
wmaker: update src/action.c coding style

This patch is updating the coding style based on checkpatch output
and as suggested by Rodolfo it also inverts the condition test
in getAnimationGeometry fct to return earlier when possible.

THIS PATCH WAS MODIFIED BY Rodolfo García Peñas (kix) because cannot be
applied in the awmaker git without changes. This patch is based in the
original patch created by David Maciejak <david.maciejak@gmail.com>