1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

204 Commits

Author SHA1 Message Date
Christophe CURIS
be1c2a01dc configure: require a minimum version for Autoconf to avoid wrong generation
As found by Douglas Torrance, when the 'configure' script is generated
using v2.68 of autoconf then it gets wrongly generated due to a regression
in the handling of names in AS_VAR_PUSHDEF, and crashes with this kind of
sibylline messages:

checking CFLAGS for -Wtrampolines... ./configure: line 11916: wm_cv_c_check_compopt_Werror_trampolines=no, unknown: command not found

This patch adds a check on autoconf version to ensure the problem will get
caught as soon as possible.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-15 20:24:22 +00:00
David Maciejak
c6e323e75d WINGs: increment version
This patch is incrementing version number as the API changed.
2014-12-10 10:19:54 +00:00
Christophe CURIS
e5efbe0cf2 configure: make the gcc check for trampolines stronger
Because the use of trampolines can be a lot of problems, this patch changes
the use of the flag to:
 - make it an error if possible, so coders are forced to not use them;
 - always enable them, not just for debug, so we increase the probability
to get them caught.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
149f6b0390 configure: add a few warning flags for gcc and clang to help catch bugs
They concern topics like:
 - portability;
 - dangerous constructs;
 - clearer code for maintainability

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
30e1fad926 configure: add macro to check compiler flag '-Wstrict-prototype'
Strict prototype are better for portability and to avoid bugs because it
makes sure the compiler has the information to properly validate the
arguments given when a function is called.

This flag however need special care when checking for it, because the
declaration for 'main' generated by autoconf cannot be a strict prototype
so the detection would always see the flag as failing.

This patch handles this by creating a dedicated macro for this detection
which uses a good prototype because we're in a case where it is possible,
so the detection will not always fail; it also makes sure to add the flag
to CFLAG only at the end, to avoid falsely crashing any further test done
in the configure script.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
11fe8bd860 configure: rewrote the detection for -Wunused-macro
This flag is always detected as unsupported because every time autoconf is
generating a test program for any feature, it puts at the beginning of the
test source all the '#define' that have been detected so far, which is what
we expect normally.

But for this option, as we cannot reasonably make a dummy use of every
macro, the warning triggers and falsely gets autoconf into thinking it does
not work.

This patch creates a dedicated macro (WM_CFLAGS_GCC_OPTION_UNUSEDMACROS)
for this flag, which works around the problem by having no '#define' in the
test source. It also adds a new macro WM_CFLAGS_GCC_OPTION_POSTPONED
because if the flag works, we still cannot add it to the compilation
command because it could fail all further tests done, so the macro will add
it to CFLAGS only at the end.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:18 +00:00
Christophe CURIS
10371836ed wmaker: work around compilers that do not support nested functions
There are a few cases in which nested functions are an helpful way to write
code, as this is explained in 'script/nested-func-to-macro.sh'. However,
some compiler do not support them (like clang), so this patch proposes an
elegant solution, where developers can get the benefit of them, but for
users they are automatically converted to C macro if needed.

The advantage of this solution is that we keep the code simple, there is no
hack in the source (like #ifdef and code duplication), yet still having the
full advantages.

The translation is done according to what have been detected by configure
(see the WM_PROG_CC_NESTEDFUNC macro) so that user has nothing to do.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-07 09:52:21 +00:00
Christophe CURIS
ff8fc10a65 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>
2014-11-02 13:08:59 +01:00
Khaled Hosny
e3dcadde30 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>
2014-11-02 13:04:14 +01:00
Carlos R. Mafra
3bd9e8358f Window Maker 0.95.6 2014-08-30 13:29:09 +01:00
David Maciejak
d3e5e73bfc wmaker: Add drag-nd-drop support
This patch is removing the experimental status of
drag-nd-drop support on the dock and adding an option
to disable the feature from the configure step.
2014-08-15 01:08:23 +01:00
Christophe CURIS
16045a6be4 Increment versions of libraries for next release due to public API Changes
WRaster:
- new function 'RShutdown'
- removed flag 'optimize_for_speed' from RContext
- new functions '...(operate_xxx)', '...(flip_image)'

WUtil:
- new function 'wutil_shutdown'
- new macro 'wlengthof'

WINGs:
- new function 'WMReleaseApplication'
- new function 'WMCreateScaledBlendedPixmapFromFile'

(And maybe a few more I missed)

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-07-20 15:31:57 +01:00
David Maciejak
97d281e310 util/wmiv: add image auto orientation detection
Based on libexif feature, this patch is adding orientation
detection and provides 2 more shortcuts for live
right/left rotation. Internal version was bumped to 0.7.
2014-06-02 14:06:03 +01:00
Christophe CURIS
a72c166b6e WUtil: make use of secure_getenv if the function is available
As pointed by Coverity (#50226), the function getenv can return unreliable
data, so if a sensitive application makes uses of the function 'wgethomedir'
or 'wusergnusteppath' we'd better use the GNU function secure_getenv which
ignore environment variable when used in a known critical cases.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:16 +01:00
David Maciejak
0c151a55f4 util/wmiv: an image viewer using wrlib
This patch brings wmiv, a fast image viewer using wrlib.
2014-05-17 15:59:47 +01:00
Christophe CURIS
698cffacc5 wrlib: grouped the detection of ImageMagick in the CHECK_MAGICK macro
Took the opportunity to expand the WM_LIB_CHECK macro because it is not
suited for the case where compilation flags can be queried but was meant
for the case when they have to be guessed

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-08 20:14:22 +01:00
Christophe CURIS
79bad0d14c wrlib: renamed compilation flags variables with a name less prone to clash 2014-05-08 20:13:17 +01:00
David Maciejak
bb69682b88 wrlib: added support for imagemagick third-party lib
It uses to provide some missing common image format
like SVG, BMP, PICT, ...
2014-04-29 10:15:27 +01:00
David Maciejak
050cae3bd2 wrlib: Added support for webp image
This patch is adding support for google webp image format, if you
don't know it a quick recap is to say that according to their tests
they claim it is better than png and jpeg.

Follow the link below for some more details:
https://developers.google.com/speed/webp/

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-04-24 10:56:51 +01:00
David Maciejak
a3ce005980 WINGs: Add support for syslog messaging
This patch is used to add support for syslog messaging implemented in
WINGs lib directly, so available from the lib itself and wmaker too.
I believe it will in a first time help to get some logging info
centralized in one point, and in a second time maybe add some info
level messages like wmaker is starting, stopping, restarting and else.

For now, it's built by default when the syslog support is found, maybe
we could also disable it by default.
2014-04-24 10:47:45 +01:00
David Maciejak
c2e4f62777 RandR misc.
This patch is replacing XRandR naming to RandR,
as XRandR is the name of the tool used in X11 and RandR
is the technology WMaker wants to support.
I had to update the info panel too, when many features are
activated not all of them can be displayed properly.
2014-04-24 10:47:45 +01:00
Alwin
afc900a7c3 New translation into Dutch for Window Maker
Because the existing nl locale files are ancient and obsolete,
the user interface stays mainly in English with hardly Dutch text
showing up.

This is a complete translation in 6 parts from scratch, using the
current (pl)menus and Makefile generated .pot files. These files
provide a very good, and thoroughly checked user interface in the
Dutch language.

Adding me as a maintainer in related README files; removing previous
maintainer (e-mail bounced).

Removing unnecessary executable bit from pt.po on the fly.
2014-04-24 10:47:45 +01:00
BALATON Zoltan
ae0cc1427f Updated Hungarian translations
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
2014-04-24 09:27:15 +01:00
Christophe CURIS
5770e53c50 Fixed a few improper macro usages
Added compiler checks for some improper macro usage and fixed the problems
pointed by gcc.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:13:33 +00:00
Christophe CURIS
c7f745c353 Configure: Added proper check for Xmu library for WRaster
The original code supposed that the library was available and ready to use.
As it may not be the case (modern distro generally don't include dev files
by defaults), add a the appropriate checks to make sure WRaster compilation
will not fail later.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
b8b59d939d Configure: Moved configure's detection of XShm to a dedicated macro
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - checks also for header usability with the compiler;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
062f6dd59d Code refactoring: replaced macro 'XSHM' by 'USE_XSHM' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
ee3422dd10 configure: Moved configure's detection of XRandR to a dedicated macro
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - checks also for header usability with the compiler;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
73c00fac27 Code refactoring: replaced macro 'HAVE_XRANDR' by 'USE_XRANDR' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
2a7a4d77d7 configure: Moved configure's detection of Xinerama to a dedicated macro
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - checks also for header usability with the compiler;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)

The feature is also no more disabled by default, as it is something user
would expect from a modern window manager.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
e106d88a42 Code refactoring: replaced macro 'XINERAMA' by 'USE_XINERAMA' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
1292b5a0cc configure: Moved configure's detection of XShape to a dedicated macro
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - checks also for header usability with the compiler;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
6184c955e7 Code refactoring: replaced macro 'SHAPE' by 'USE_XSHAPE' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
32342a6428 configure: Replaced deprecated construct with recommended new check
The macro 'AC_ISC_POSIX' is now said to be deprecated, so we use the new
recommended check instead as we make light use of the corresponding
function.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
10bc05170c configure: Enable compiler warnings for trampoline code generation
This attribute reports cases where GCC has to generate special code to
handle some C constructs, for which we'd prefer an explicit code instead
of counting on GCC doing the work.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
12b6120f05 configure: Removed deprecated lines for unused X stuff 2013-12-30 18:11:05 +00:00
Christophe CURIS
9e90cebc01 configure: Enable compiler warnings to help add 'noreturn' attribute
This attributes helps the compiler to produce better binary code.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
fc825382d6 configure: Enable compiler warnings to help add 'format' attribute
This attribute helps the compiler checking the type matching between
arguments and the specification in a printf-like format string, to
avoid invalid output. This attribute is optional, but some compilers
can suggest functions that could have it.

This patch adds the appropriate compiler flags if they are supported when
the source is being compiled with DEBUG enabled.

The patch also introduces a new macro WM_CFLAGS_CHECK_FIRST because in some
cases AX_CFLAGS_GCC_OPTION is not really efficient and in present case it
does not fits the job.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
10953b3a7e configure: Add check on function prototypes when debug is enabled
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
324248ecde configure: Minor changes to option parsing for consistency
The idea is to:
 - have a consistent looking file by using autoconf macros
 - provide better feedback on improper option usage

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
f9c1265604 configure: Added a check to try to enable STD C11 if possible
Some compiler support C11 standard by default, some need an explicit
option, and some don't support at all; this new macro only tries to enable
support if possible, the actual feature support being done by other checks
on case-by-case

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
349bc2dda2 configure: Do not keep assertion if debug was not enabled
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
4cf72c990d configure: Less intrusive CFLAGS change when --enable-debug is chosen
The previous code made a dumb change to CFLAGS which would cause user
supplied CFLAGS to be ignored, and possible compiler compatibility issues.

The new code does the same changes in a smoother way, so we do not totally
drop user specified or script detected compiler options.

When debug is enabled, we also include a reminder for the final CFLAGS
value.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
fd47650717 WUtil: New macro 'wlengthof' in the public API to get number of elements in an array
The new macro 'wlengthof' returns the number of elements for which a local
array have been defined, which makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.

The macro includes a static assertion to stop compilation if it is being
used on a pointer, for which we cannot know the size of the array, to
avoid generating dummy result. This can work only with C11 which
standardised the static assertions.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
356c242143 configure: Moved PPM image format handling to a consistent place
Even if there is nothing to do for PPM at current time (all builtin
code), for consistency it is better placed with the other image
format checks.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
b66a890404 wrlib: Moved configure's detection of XPM support to a dedicated macro
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
 - makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
 - uses an automake conditional to avoid compiling the file is support is
not enabled

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Christophe CURIS
a5ca34ccb1 wrlib: Moved configure's detection of TIFF support to a dedicated macro
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
 - makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
 - uses an automake conditional to avoid compiling the file is support is
not enabled

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:02 +00:00
Christophe CURIS
1c21d946ec wrlib: Moved configure's detection of PNG support to a dedicated macro
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
 - makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
 - uses an automake conditional to avoid compiling the file is support is
not enabled

It includes a typo fixed by Amadeusz S-B³awiñski.-A

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:02 +00:00
Christophe CURIS
777bf28ab3 wrlib: Moved configure's detection of JPEG support to a dedicated macro
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
 - makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
 - uses an automake conditional to avoid compiling the file is support is
not enabled

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:02 +00:00
Christophe CURIS
f892ce4d37 configure: Moved detection of GIF support to a dedicated macro
The original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.

The new macro:
 - uses as much as possible autoconf macros for portability and code
consistency;
 - provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support);
 - makes uses of shell functions to keep generated configure smaller by
sharing reusable stuff;
 - introduces a tracking of unsupported things to be reported to user

It includes a fixes from a problem found by Amadeusz S-B³awiñski, because-A
the function 'wm_fn_imgfmt_try_link' modified the variable LDFLAGS
instead of LIBS.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:02 +00:00