1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

94 Commits

Author SHA1 Message Date
Christophe CURIS
c743c4b77b doc: updated man pages for many tools
This patch perform simple fixes to the man pages and tool help page:
 - minor style updates, to get cleaner pages
 - option re-ordering, to have them in alphabetic order (easier to search for)
 - consistency updates for descriptions and number of dash
 - spell-checking

The biggest changes are:
 - wmagnify: the option 'vdisplay' was not documented at all;

 - getstyle: the list of attributes that are taken for the Style are now
described in their own section to clarify the page;

 - setstyle: the help page left thinking that the file argument was
optional, which is not the case;

 - wdread: as the Exit Code may be useful, and it is not unusable, it is
now documented;

 - wmgenmenu: added information about how the content of the menu is
generated;

 - wmsetbg: added a section about dithering/best-match because as nowadays
most screens are in True Color, the reason for the option may not be clear.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 19:31:10 +01:00
Christophe CURIS
0e884f793a util: remove local constants GLOBAL_DEFAULTS_SUBDIR that are not used
As pointed by gcc, this macro is not used anywhere in the 2 files. Because
the code also suggests that they should be inherited from any other place
anyway, remove them from the file to prevent them from being used in the
future.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:20 +00:00
Christophe CURIS
3de5b8fb42 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>
2014-11-02 13:08:59 +01:00
Christophe CURIS
d90c8d5370 util: add check for size validity (Coverity #50224)
As pointed by Coverity, when reading the size of data using 'readmsg' that
size cannot be fully trusted (possibly in case of bugs in present case),
so this patch adds a check to ensure it is valid before continuing.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-16 20:00:09 +01:00
Christophe CURIS
7c142f54d0 util: add proper check for null pointer in wmsetbg (Coverity #50198)
As pointed by Coverity, it is possible that the variable 'image' remains
NULL in the function parseTexture, so this case must be checked
appropriately where it is used.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-16 20:00:09 +01:00
Christophe CURIS
3250826215 util: fix leaks in wmsetbg's changeTextureForWorkspace (Coverity #50169)
As pointed by Coverity, some locally created PropList objects are not freed
when the function returns. The truth is their refCount is 1 more than what
they should be, but that's more than what Coverity can detect today.

This patch adds the appropriate release calls when they are not needed
anymore, which will actually not free them but get their refCount right so
they will be freed as soon as the PropList in which they are used are
released.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-16 20:00:09 +01:00
Christophe CURIS
e5ebe0cb92 util: fixed memleak in wmsetbg's updateDomain (Coverity #50167)
As pointed by Coverity, the function wstrconcat is allocating memory to
return its result, which is not freed in old coding of the function.

This patch uses a local storage buffer to have a simpler code to generate
the command to bu run with 'system' without leak.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-16 20:00:09 +01:00
Christophe CURIS
9cef8c882e util: fix image leak in wmsebg's parseTexture (Coverity #50166)
As pointed by Coverity, in some case of texture with image that needs to
be scaled the temporary scaled image would be leaked if and error occured
during its conversion.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-16 20:00:09 +01:00
Christophe CURIS
b5e2821c3e util: removed unnecessary RReleaseImage in wmsetbg (Coverity #50077)
As pointed by Coverity, it is not useful to call RReleaseImage if we are in
the branch of code where we know that the image for which it is being
called is NULL.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-16 20:00:08 +01:00
Christophe CURIS
a772f2797d wrlib: add explicit type definition in API to allow compiler Type Checks (3/3)
When defining enums as types instead of simple enums allows to use these
types at the places where the corresponding enum values are expected, then
allowing the compiler to check that, potentially reporting incorrect use
of values to the user.

This patch adds the type for the gradient style for RRender*Gradient.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-15 19:45:20 +01:00
Christophe CURIS
eb3f0b12f8 wrlib: add explicit type definition in API to allow compiler Type Checks (1/3)
When defining enums as types instead of simple enums allows to use these
types at the places where the corresponding enum values are expected, then
allowing the compiler to check that, potentially reporting incorrect use
of values to the user.

This patch adds types for the configuration fields in the RContextAttributes
structure.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-15 19:45:20 +01:00
Amadeusz Sławiński
c478a39a4a reformat output so it fits on terminals with 80 columns
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-19 22:09:58 +01:00
Amadeusz Sławiński
22f1ae15e6 util: Value stored to 'count' is never read
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-18 23:00:17 +01:00
Christophe CURIS
ab348c6dc8 Add attribute 'noreturn' to a few functions pointed by clang
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-09 20:44:38 +01:00
David Maciejak
aed4d78e87 util: Make code a bit more secure
- add some checks on functions return values
- use snprintf to avoid buffer overflow
2014-04-24 10:56:25 +01:00
David Maciejak
01478146f9 Add call to WMReleaseApplication on application exit 2014-04-24 10:56:25 +01: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
f8b6871371 util: Added noreturn attribute to appropriate functions
clang is a bit more strict on the attribute usage, so let's comply.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
7491f5479b util: Removed unused procedure that caused a compilation warning
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
cd78f11abc util: Marked args as unused for compiler in X Error handlers
When an error occurs in X, the Xlib is using a callback mechanism to
execute application code to handle the problem, which means having a
fixed argument list for that application 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>
2013-11-01 15:27:10 -02:00
Christophe CURIS
549cefc47b util: Added a few missing 'static' attributes for functions 2013-05-12 01:01:20 +01:00
Christophe CURIS
a622197faa Added explicit 'void' to function that takes no argument
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.
2013-05-12 01:01:20 +01:00
Christophe CURIS
5d03c455fc util: Added 'const' attribute to function parameters 2013-05-12 01:01:19 +01:00
Christophe CURIS
e7c2a3dc69 util: removed deprecated file 'directjpeg.c'
The content is not used anywhere, and this is probably mostly due
to the fact that the behaviour is provided by the WRaster library
in a better way.
2013-05-10 19:37:47 +01:00
Amadeusz Sławiński
fc5c0fe1a4 Add fill screen scale to wmsetbg
I noticed that I can have different background with wmmsetbg for each
desktop and wanted to use it, but it was missing option to fill the
screen with proportionally scaled image, so here it is.
2012-06-03 17:02:30 +01:00
Tobias Stoeckmann
cc30444dda No need to call memset after wmalloc
memset is the last function call in wmalloc, just before it returns the
newly allocated memory.  Therefore it is not needed to call it again
after wmalloc call.  Although I would prefer to switch wmalloc to a
calloc-based wcalloc function, the compatibility of WINGs for old apps
should be kept.
2012-05-04 18:41:01 -03:00
Tamas TEVESZ
f65b99e615 Remove warnings
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
2011-03-24 16:19:52 +01:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Brad Jorsch
060ba6a9cd Fix path substitutions
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".

The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
94a0c7b42f Fix some double newlines
Just a couple that woud now print double (or several more) newlines.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
1f21919809 Remove wsyserrorwithcode, rename wsyserror to werror
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Brad Jorsch
12de2f319e Fix uninitialized vars
Initialized variables that are conditionally set. In particular, this
construct is dangerous:
  void *p;
  if (something) p = couldReturnNull();
  if (!p) p = fallbackFunction();
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
e7a46d5cdf Attach utils versions to WM version 2010-04-02 08:38:39 +02:00
Tamas TEVESZ
1a0c8afa80 Remove texture plugins
- leave a note for the unlikely case of such configuration being found,
  the user is notified properly
2010-03-26 21:08:16 +01:00
Tamas TEVESZ
118a93808a Idle fixes
- add new wglobaldefaultspathfordomain() to wings (replaces several
  hand-rolled individual implementations in utils/)
- make all of 'em handle -h|--help, -v|--version
- try making them not to nothing silently
- change various ways of knowing thyselves to using __progname
- generally try to make them feel similar (NOT right, similar --
  right is a completely different matter)
2010-03-23 21:50:17 +01:00
Iain Patterson
5c46f48898 Support Xinerama in wmsetbg.
Allow wmsetbg to revert to pre-0.90.0 behaviour when choosing a
background image that is large enough to span several heads in a
Xinerama setup.  If the -X flag is passed to wmsetbg, the background
image will be stretched to fill the logical screen (as it would be by
default in older versions of wmsetbg) instead of being tiled across
screens.
2009-09-14 16:51:26 +02:00
Martin Dietze
3f6ae395ce Add GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am 2009-08-24 11:55:20 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
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 :-)
2009-08-20 00:59:40 +02:00
dan
c0317ddae5 eliminated gcc-4 compilation warnings 2005-08-22 23:58:19 +00:00
kojima
d63a0b4859 added option to disable switchpanel
fixed some bugs
2004-10-27 02:54:32 +00:00
dan
193a63511d - Fixed all // comments
- Final cleanups
2004-10-23 03:30:03 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
9aca0d5f6e - Check whether libXft is at least version 2.1.2 else refuse to compile.
- Fixed bug in icon chooser dialog that could cause a segmentation fault
  in some cases (Pascal Hofstee <caelian@gmail.com>)
- Fixed crash in asm code in wrlib, with new versions of gcc.
- Fixed bug in the x86_PseudoColor_32_to_8() function which incorrectly
  used the r, g, b fields in the conversion.
- Fixed x86 ASM code in wrlib to work on 64 bit architectures.
- Fixed the focus flicker seen with some apps (notably gtk2)
  (Alexey Spiridonov <snarkmaster@gmail.com>)
- Fixed all crashing bugs that were generated by wmaker starting with the
  WMState file missing.
- Added NetWM support (a modified version of the patch originaly written
  by Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate
  it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied a few xinerama and placement fixes (Peter Zijlstra
    <a.p.zijlstra@chello.nl>)
- Fixed memory leak in dock code.
- Fixed and enhanced the text wrapping in WINGs.
- Fixed the layout of some elements in WPrefs.app
- Added workaround for aplications that don't set the required hints on the
  client leader window, but they set them on normal windows (observer with
  KDE 3.3.0 mainly). This will allow these apps to get an appicon again.
  (they should be fixed still)
- Added workaround for applications that do not set a command with
  XSetCommand(), but instead they set the _NET_WM_PID property. This works
  with operating systems that offer a /proc interface similar to what linux
  has. (This also is to fix problems with KDE 3.3.0 apps, but not only them).
- Fixed bug with autostart and exit scripts not being executed if user
  GNUstep path was different from ~/GNUstep (when setting GNUSTEP_USER_ROOT)
- Added utf8 support in WINGs (removed old X core font code)
- Added utility to convert old font names to new font names in style files
2004-10-12 01:34:32 +00:00
dan
474c4caf94 reverted the last test commit (duh) 2004-07-16 18:50:58 +00:00
dan
109bb540ec another test for cvs notifications 2004-07-16 18:18:36 +00:00
dan
27a396d7ed - Fixed sloppy focus bug
- Made maximizing behaves differently with keyboard/mouse for xinerama
  (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- A few leftover xinerama fixes (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Extended the 'strut' to multiple heads
  (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Icon placement now takes into account the new xinerama extended 'strut'
  (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Icon arrangement that takes the new extended xinerama 'strut' into account
  (Peter Zijlstra <a.p.zijlstra@chello.nl>)
2003-06-06 04:11:00 +00:00
kojima
ed0d234d7f solaris xinerama fixes, wmsetbg updated for xinerama 2003-06-04 20:40:00 +00:00
dan
e727cbadb6 - Fixed Clip's workspace menu mapping to be consistent with the others
- Fixed bug in wmsetbg that caused scale and maxscale to both do maxscale
  (Alexey Voinov <voins@voins.program.ru>)
2003-02-28 12:42:16 +00:00
dan
b5ef388711 - Fixed edge resistance and move/resize frame drawing for borderless windows 2003-02-16 01:47:58 +00:00
kojima
7a8bde44fa fixed bug in tpixmap after xinerama patch 2003-02-13 16:27:45 +00:00