Center strategy: try to put window at the center of the usable area. If
window would overlap with existing windows, fall back to "Auto"
placement strategy.
It's very useful for fresh workplaces.
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.
Use the WindowRelaunchKey shortcut to examine the WM_COMMAND property of
the active application's main window and launch a new instance of the
application using the retrieved command line.
I have noticed that in WindowMaker 0.95.2 application icons bounce
when some actions are done, like starting a program, etc.
Disabling Superfluous or Animations also disabled the minimizing
animation which I am used to, so doing that didn't do the job.
Everyone has got his or her own tastes, but I did not like the new
behavior and didn't find any way to disable it without affecting other
things.
So I made a patch to fix just that. It adds a new option in WPrefs.app's
Expert Tab called "Do not make AppIcons bounce" which when enabled,
disables any type of bouncing for Application Icons, restoring the
old behavior.
Bouncing stays the new default behavior.
Replace the ARROWLESS_KBD #define with the ViKeyMenus preference.
When ViKeyMenus is TRUE, users can type h/j/k/l to scroll around menus.
Since ARROWLESS_KBD was previously undefined by default, ViKeyMenus is
FALSE by default.
The function captureShortcut() is implemented in both files KeyboardShortcuts.c
and Menu.c, with just a minor difference regarding the conversion to upper case.
To unify them, define a new function which includes a new boolean paramenter to
dictate whether the upper case conversion should be done or not.
There's no need to have a private function while there's one in WINGs.
Besides that, it does not remove trailing whitespaces appropriately as I
just tested by adding trailing space in the shortcut captured by WPrefs.
It is not trimmed before saving it:
[mafra@Pilar:Defaults]$ grep CloseKey WindowMaker
CloseKey = "Mod1+C ";
Using wtrimspace() fixes that and even saves 208 bytes of code:
[mafra@Pilar:WPrefs.app]$ size KeyboardShortcuts.o.*
text data bss dec hex filename
7703 0 0 7703 1e17 KeyboardShortcuts.o.new
7911 0 0 7911 1ee7 KeyboardShortcuts.o.old
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
If you delete the file ~GNUStep/Defaults/WMRootMenu and run WMPrefs
and go to the Menu Edit tab, it will show a dialog about keeping the menu or
discarding it. If you discard it then WPrefs shows an error:
"Could not open default menu from
'/home/user/GNUStep/Library/WindowMaker/plmenu"
The problem is at WPrefs.app/Menu.c:1424, and it happens because it tries
to load the default menu from the user's GNUstep home, but plmenu is not
copied there during the installation.
Of course, the file doesn't need to be copied to the users home, so
WPrefs should try to read it from /usr/share/WindowMaker/plmenu (Debian)
or /usr/local/share/WindowMaker/plmenu (upstream).
The one in WPrefs.app/Appearance.c is indirect: the function might
be inlined and might return an uninitialized value, which causes gcc to
complain that the caller might use that uninitialized return value.
* 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)
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>
s/enviroment/environment/ both in the .c file and in all .po files that
already contain a translation for the string. The latter prevents
wrongly marking the translation as fuzzy.
On the one hand, libWINGs wasn't linking against -lX11 when it should
have been. And on the other, only libWINGs needs Xft, only wmaker needs
Xrandr, only wmaker and wmsetbg need Xinerama, only libwraster needs
Xmu, and -lpng may not need -lz.
Cleaning this up can help distributions get their dependencies correct,
and might even avoid loading the unused libraries at runtime, so we may
as well do it.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
If you link against a library A that itself links against a library B,
it may or may not work to use symbols from library B in your executable;
this is known as "indirect linking". GNU ld does indirect linking by
default (but it can be disabled using --no-add-needed), but the new
experimental GNU gold linker does not do this. It's an easy fix for us,
as the tests are all already done in ./configure, we just need to tell
the Makefile.ams to use the results.
This should fix Debian bug #556677, if they ever start using this
branch.
[crmafra: Folded Andreas Metzler patch to update debian/changelog]
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
Prevent WPrefs (menu panel) segfaulting upon coming by an invalid command in
the root menu.
Reported and first patch version by Bento Loewenstein.
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
If the appicon is not in the dock/clip, or the dock/clip is not set to
"Keep on Top", there's a good chance you won't actually see the bouncing
because some other window is covering the appicon.
Besides adding the option to raise bouncing windows, this patch adds a
utility method to move a window back into its correct stacking position
after it has been messed with using XRaiseWindow.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
I just spent an hour trying to find out why the latest wmaker-crm was
ignoring a number of the preferences in my configuration file. It turns
out the problem was that commit f41db5 added a value into the middle of
the enum in src/keybind.h, and the setting of
AUTOMAKE_OPTIONS = no-dependencies in all the Makefile.ams meant that
make wasn't smart enough to rebuild the files depending on it.
Would anyone mind if we just remove no-dependencies from
AUTOMAKE_OPTIONS? People can still run ./configure with
--disable-dependency-tracking to disable it at configure time.
Instead of using the --disable-verbose-compile hack, let's
use the standard option --enable-silent-rules (or 'make V=0' directly)
available with autoconf 1.11 and higher.
This is enabled in autoconf by using 'silent-rules' in AM_INIT_AUTOMAKE.
The verbosity of compilation is reduced in a similar manner as using
the --disable-verbose-compile option, so we can remove all that ugly
hackery.
The "make dist" command can be used to generate the release tarball, but
only if the Makefile.am correctly specifies EXTRA_DIST, specifies
headers in foo_SOURCES, and so on.
Initialized variables that are conditionally set. In particular, this
construct is dangerous:
void *p;
if (something) p = couldReturnNull();
if (!p) p = fallbackFunction();
A few internationalized format strings have only one %s in the default
while two strings are being passed. Change those defaults to have two
%s's, which means we also have to update the .po files to match. May as
well throw in the extra %s in the translated version while we're at it.