Previously, we released the color well's color even if it was the same
as the new color. This eventually resulted in a segfault when calling
WMPaintColorSwatch because we tried calling XFillRectangle with no
display.
We fix this by only releasing/updating the color well's if it differs
from the new color.
To preserve the accuracy of the operation, the C standard request that the
mathematical operation is performed using double precision, but in many
case this is not necessary so this patch fixes a few constants to avoid
that conversion.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by gcc, this constant is not used anywhere, and it looks like
it have always been the case. As there's no reason to specifically add a
border to this widget, remove the constant.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The color well contains two views: view, consisting of the outer "button", and
colorView, consisting of the color itself. Previously, only clicking on view
would bring up the corresponding color panel, resulting in nonintuitive
behavior.
As callback have a fixed prototype, it is correct to not use all the
arguments, so this patch adds the appropriate stuff to avoid a false
report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WINGs dispatches window resize events using callback functions, which
means having a fixed argument list for that function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The drag-n-drop mechanism is managed by WINGs through callbacks, which
means having a fixed argument list for the handling function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
It is dangerous to let the compiler know about a function without
letting him know the arguments because he won't be able to report
invalid calls.
This patch concern the cases where adding the arguments did not
need other code change.
This is the correct way to tell that a function takes no
arguments, because an empty parameter list tells the compiler
that it is not yet defined, and is tolerated only for
compatibility with very old C compilers for whom prototypes
were not yet a defined language element.
for arq in `git ls-files *.c`; do
echo $arq;
indent -linux -l115 $arq;
done
The different line break at 115 columns is because
I use a widescreen monitor :-)
- Removed MIN() and MAX() macros and replaced them with WMIN() and WMAX() from
WINGs.
- Added a hint that Window Maker crashed, to allow windows to be placed
in their correct previous positions after a crash situation and also to
preserve their state before the crash (minimized, shaded, hidden, ...)