wmaker: fix moveres.c compilation warning

This patch is fixing compilation issue:

moveres.c:1801:65: warning: unused parameter 'dx' [-Wunused-parameter]

by removing variable 'dx' from getResizeDirection function.
wmaker: switch back icon name to the window name when needed

This patch is setting the icon name to the window name when
_NET_WM_ICON_NAME is not provided by the app.
wmaker: unset default app logo size

This patch is setting the app logo max size to 128 as what can
be found in the rest of the code, so the logo is not restricted
anymore to the icon size defined by WPrefs.
The goal is to solve the resize issue that appears when the logo
is used in Info and Exit panel.
wmaker: update drag-nd-drop label related

This patch is updating the drag and drop labels
from docked app settings window. As i am not sure common users
are aware of what 'DND' means.
wmaker: src/dialog cosmetic code change

This patch is just renaming the variable used for the info panel
from 'thePanel' to 'infoPanel'.
wmaker: add miniwindow apercu

This patch is adding miniwindow apercu when the mouse
is over the miniwindows.

To enable it you have to run WPref, in Miscellaneous Ergonomic
Preferences, check miniwindow apercus.
Then, you will be able to see a screenshot of the app when the mouse
is over the miniwindow.
apercu: Make preview size a configuration option

Since the resolution of the Retina display tends to make everything small,
the default apercu preview size (twice the icon size) couldn't be used to
distinguish the window contents without tiring too much my eyes.

Therefore, let's make the apercu size a configurable option. You can set
it through the ApercuSize variable with

$ wdwrite WindowMaker ApercuSize 4

in multiples of the icon size (in this case the apercu size will be four
times the icon size).

The default size remains 2 (twice the icon size).
wmaker: change default app icon

This patch is changing the default application icon to
a one that reminds the NeXTcube but also a blackbox of
something we don't know about.

It's from LuBu OpenMagic 1.0 for Sparc project at
www.alge.no/index.php/OpenMagic_1.0

According to the license,
"LuBu OpenMagic 1.0 is put into the public domain"
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.
wmaker: src/action.c merge duplicate code

This patch is merging some duplicate code related
to animation position.
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.
wrlib: add merged code for xpm support in 2 distinct functions

This patch is adding some merged code in
create_rimage_from_xpm and is_xpm_error fonctions.
wrlib: remove duplicate code from xpm support

This patch is removing the duplicate code by
using functions create_rimage_xpm and is_xpm_error
previously created.
wmaker: add support for more mouse buttons

This patch is adding support for back/forward mouse buttons
and the left/right wheel tilt buttons.
WPrefs: add new mouse buttons configuration support

This patch is updating the mouse button configuration panel
to be able to set action to the new mouse buttons supported.