wWorkspaceNew if swapped

This patch only swaps the "if-else" block where the workspace count
variable is checked. Now, the wWorkspaceNew function uses less tabs.
wWorkspaceNew removed unused code

This patch remove some code not used:

1. The variable  wspace->name is set to NULL, so we don't need check if the
   value is NULL.
2. The variable new_name is set to NULL, so we don't need check it.

This patch moves the variable definitions to the top and add some extra
comments.
WSA: Make the Clip creation similar

This patch makes the Clip creation similar in the functions
wWorkspaceNew and wWorkspaceRestoreState.

The Clip creation in the function wWorkspaceNew checks if the workspace
number is 0, so is the first workspace, and call only for that workspace
the clip icon creation. In the icon creation, we check if the icon image
was previously created.

Really, we can avoid this check, and call the icon creation always. If the
icon was previosly created, then the function won't do nothing.

This patch also moves the get from dictionary call some lines above.
WSA: New function set_workspace_clip

This patch includes the new function set_workspace_clip. This function
moves the code to create a new clip in the worskpace from the functions
wWorkspaceNew and wWorkspaceRestoreState.
Removed dup code

The if "wPreferences.focus_mode == WKF_CLICK", was already checked
some lines above. We already know that wPreferences.focus_mode == WKF_CLICK.
New function window_focus_sloppy
New function window_focus_click
Add script to update ChangeLog from git log.

This patch adds update-changelog.pl, a script which adds the subject line and
author of every commit since ChangeLog was last touched by git, in a style
consistent with the entries up to version 0.92.0.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
wmaker: fix arbitrary shell command injection

Workspace background pref can be tricked to run arbitrary cmds.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
WINGs: add function to get button caption

This patch is adding a new function WMGetButtonText to get the button caption.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
wmaker: fix maximizing window in multiple screens env

This patch is fixing the maximize window feature.
As it was reported by Miikka Veijonen, in multiple
screens env wmaker is reserving some space for the dock
even on screen that are not displaying it.

This patch is only adjusting the working area for the head
that is displaying the dock.

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: Add optional Pango text layout support

Currently WINGs renders text using Xft directly which does not support
any advanced text layout that is needed for scripts like Arabic or Indic
scripts (or even things like automatic ligature support for Latin
script).

With Pango we also get text fallback for free, so no more square boxes
for characters not supported in the current font (unless no font on the
system supports the specified character, of course).

This patch introduces support for using Pango to render the text (though
its Xft backed), to avoid forcing the additional dependency to everyone
it is made off by default.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
util: clarify error message in "wmaker.inst" in case of directory creation failure

Previously, the directory was expected to already exist, but as now it is
automatically created it is a good idea in case of problem to have the
message clearer.

Took opportunity to indent properly that part of code.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wrlib: fix usage of deprecated attribute for gcc 3.x

It seems that the argument to the attribute 'deprecated' is a novelty of
gcc 4.x, the attribute introduced in gcc 3.x did not take any parameter.

As Solaris 10 is providing gcc 3.4.3, this patch updates the detection in
the public API header to make it compile properly.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wmaker: remove call to internal X11 header

The header 'Xarch' is not part of the standard, it is an internal header
that is already included by the other headers; furthermore it is not needed
directly by the code in wmspec.c.

As it breaks compilation on some platforms (namely Solaris 10), its call is
removed.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
configure: add detection for 'nanosleep' function with appropriate headers

As reported by Milan Čermák, Solaris needs extra library 'rt' to have
access to that POSIX function, so we properly check for it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
util: removed usage of external '__progname' because it is not portable

As reported by Milan Čermák, using this variable breaks compilation on
Solaris, because it is a hack which is not standard. To ensure portability,
we now rely on main's argv[0] which is always available.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wrlib: add support for release 5.1.0 of the libgif

As reported by Andrew, the compilation of the WRaster broke because
there was an API change in libgif v5.1 versus the v5.0 (something had been
forgotten for DGifCloseFile to be easily used in wrappers for dynamic
languages).

Now, if we have detected that we're in 5.x release, we use the GIFLIB_MINOR
macro to see what the function prototype is (this macro was introduced only
in 4.1.6 so we cannot fully rely on it to detect the version of the
library).

The possible error code is not used because at the place we use the
function we would not be able do do anything more meaningful with it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WPrefs: created macro 'wlengthof_nocheck' for the cases were wlengthof cannot be used

Because the macro wlengthof preforms a check of validity of its argument
with static_assert, there is a use case where it fails with a compiler
error. This patch introduces an alternate macro without the check, to be
used only for this specific case.

To be able to use the size of the array, a few of those array declaration
have to be moved before the structure in which their size is used.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WPrefs: replaced a few constants by the macro 'wlengthof'

This reduce the risk to miss something in case the array they refer to gets
updated, because with the macro the proper number of element will be
evaluated by the compiler automatically.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>