The rationale is the same as in commit c7f2a189c4
("Fix the call to XChangeProperty() in 64-bit mode"), because we are
calling XChangeProperty() with format 32, which requires the type of
'data' to be 'long'.
- Does away with the O_BINARY abomination
- as a byproduct, plugs an fd leak in wcolorpanel.c:fetchFile()
- sprinkle some fsync()s to files that have been written to (this
needs to be done everywhere)
+ fix brown paper bag thinko in configure.ac
* Remove directly include of <libintl.h> and include src/wconfig.h, that
already include libintl.h and declare _() function
* Replace some gettext() calls to _()
These changes fixes build with LINGUAS is unset, and removes I18N
support in this case.
was this ever used for anything? i checked a couple hundred dockapps,
no joy; there's nothing in debian (afaict) that build-depends on it,
so let's try doing away with it.
- tested on Net, Free, Open and DragonFly
- fix up the linux version (terminate argv with a null ptr)
- add error handling to file ops in the linux version
- add a stub version for platforms not supported
As the README used to say, it was a unfinished work. If someone
wants to finish it after all these years it can be recovered
from the logs. But meanwhile let's not carry dead code around.
- 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)
In the wmaker-dev list, Iain noted that:
"I can see the benefit of this. I know of at least two
applications[1] which don't bother to set a class and instance. Early
versions of my OS X cycling patch for Window Maker caused a crash when
faced with such windows because I forgot to check that these
properties existed. Nowadays it just refuses to do the cycling.
Also Window Maker won't let you save attributes on such windows from
the Inspector.
[1] Interestingly they are competiting commercial applications: No
Machine and Exceed onDemand."
[crmafra: edit commit log]
Since getstyle now saves the theme pack in $GUR instead of
the cwd, there's a slight possibility you can specify a theme
pack name that will do Bad Things to your existing stuff.
To that end, specified theme pack name is "sanitised" a bit, as in
forward slashes in it are replaced by an underscore.
Oh yes, i forgot to mention. getstyle now saves the theme pack
in $GNUSTEP_USER_ROOT, not in cwd.
- make it use wings functions, remove duplicated code from getstyle
- de-static necessary functions in wings
- add new wrmdirhier to wings
- rename WMMkDirHier to wmkdirhier (fits better)
- remove calling shell from getstyle (what were they thinking?)
i couldn't quite test getstyle (no idea about themes), but it still
basically works.
do back your ~/G dir up... wrmdirhier might eat it!
definitely needs testing, especially by people who have any idea
how themes work.
Some more getstyle
- missed a shell invocation
- maybe copyFile should be in wutils too...?
[crmafra: Folded second patch into the first]
By defining a struct containing the coordinates of the
windows (top, bottom, left, right, width, height) and
using a helper function to set up these coordinates, the
whole function becomes much cleaner and easier to read.
make wtrimspace() use wings' own function for a task
semantics change: it used to segfault given null, now it returns null.
this doesn't affect any current use (there's exactly one..), and i see
no harm in this behaviour, and perceive this to be more natural.
The result is not much more convoluted than the original was, but much shorter.
Several vararg macros were added -- no idea what !gcc compilers make of this.
The messages sent to these functions are inconsistent across the source tree.
I have now decided that the logging function will add the final newline -
messages will need to be modified accordingly.
I have no idea why the original implementation was as complicated and ugly as
it was. My guess is that it was anticipated that these are be called from
sighandlers, but why no snprintf when they are all stuffed up with vsnprintf...
Still, the result is not worse in this regard either.
It addresses this warning
dialog.c: In function ‘LoadHistory’:
dialog.c:209: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(void *, void *)’ but argument is of type ‘int (*)(const void *, const void *)’
but induces others in other places. One of them was this one
window.c: In function ‘wManageWindow’:
window.c:782: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(const void *, const void *)’ but argument is of type ‘int (*)(void *, void *)’
which is fixed by constifying the arguments of matchIdentifier(). The other warnings are
fixed similarly.
WindowMaker.h already #includes wconfig.h, which checks exactly
the same thing. So remove it from WindowMaker.h.
However, it would be better if WindowMaker.h didn't include
wconfig.h at all. The only reason I see for the inclusion is
the check for KEEP_XKB_LOCK_STATUS, defined in wconfig.h.
But that can be probably cleaned up too (I guess modern X's
enable XKB stuff that by default, by I haven't checked)
But anyway.
remove the choice of atomic/non-atomic writes. firstly, the only users
of non-atomic writes were getstyle and geticonset; secondly, who in their
right minds would ever want non-atomic writes; thirdly, the file system
will screw you anyway *G*.
...which creates directory hierarchies under $GNUSTEP_USER_ROOT
- make WMWritePropListToFile() use this
readily solves the "run dialog history vs nonexistent state dir" case.
if other consumers are found for this, just de-static and move the
prototype to WUtil.h or some other appropriate place.
Taking the border width into account was making it hard to follow the
algorithm, and complicating things usually lead to mistakes.
In fact, in trying to account for this +/- 1 pixel issue the maximus
geometry for the requested window would sometimes overlap another window
by one or two pixels (depending if it was on the right or left). Therefore,
applying the maximus geometry to this other window in sequence would
maximize it completely instead of finding the correct tiled geometry.
So that always bugged me. Now I got tired of it and decided to kill the
whole consideration of the border width, and simply put some "+ 1"
inconditionally to be on the safe side.
Now it can happen that the windows will stay away one or two pixels,
but trying to be 'good enough' is better than trying to be 'perfect'
and getting it wrong for corner cases.
And the matter is worse because the size of xterms are 'quantized', so
changing the position of the other windows by a few pixels result sometimes
in a overlap of +1 pixel, or a distance of 1 or 2 pixels. Furthermore,
the bottom of xcalc behaves differently from the bottom of a xterm or
xjed (for xcalc the ad hoc correction for bottom_0 must be -8 in total).
But now my tests show that things are OK, and I can use maximus
for all the windows in the screen and no overlap will occur (except
if one of the windows is a xcalc, I don't know why).
It wasn't defined anywhere and when I defined it, the compilation
did not finish:
appicon.c: In function drawCorner:
appicon.c:206: error: WScreen has no member named focused_texture
appicon.c:208: error: WScreen has no member named unfocused_texture
appicon.c: At top level:
appicon.c:214: error: conflicting types for drawCorner
appicon.c:193: note: previous definition of drawCorner was here
make[2]: *** [appicon.o] Fehler 1
make[1]: *** [all] Fehler 2
make: *** [all-recursive] Fehler 1
So let's simply remove those #ifdefs.