This patch is adding keyboard control to the wlist widget
(up/down/pgup/pgdw/home/end) and typeahead list search.
That component is for example used in the wmaker icon chooser,
and WPrefs keyboard shortcut, font conf panels.
This patch is fixing memory leaks when pango structures are used
but not freed.
Also according to commit 4f050ebab9,
previous_text string in WMWidthOfString can be not NULL terminated,
the same construct is used in WMDrawString and WMDrawImageString
functions, so to be safe better to also check for the length
of the string.
This patch is fixing some issues in how right and center aligned
wtextfields are handled.
-text selection with mouse was not working properly especially
setting and identifying the cursor position
-middle button paste was only working for left aligned text
This patch is fixing the issue reported
at https://github.com/window-maker/wmaker/issues/62
where wmaker is crashing if the font specified in WMGLOBAL is not found.
Now by default it will failsafe to DEFAULT_FONT.
The cursor is moved using right/left arrows but as it's blinking
and a XOR function is used to hide/unhide it, it happens the cursor
can be not hidden properly from its previous position.
Better to refresh the view to avoid such issues.
In case the cursor is positioned out of the textfield view
after a delete and more chars are entered, wmaker process
will reach 100% and become unresponsive.
How to reproduce:
in the run command window enter an overly long text (longer than
the current input field view). Then, press home to go back to the
beginning of the string. Then, shift-End to select all the text,
then del to delete all the text. At that point the cursor is still
out of the view and if you enter more text wmaker process will be stuck.
According to the ICCCM, a reply to a TARGETS request must be a list of atoms.
Took the chance to also fix variable naming consistency between wtext and
wtextfield which are using the same kind of code.
* "unknow" -> "unknown"
* "occured" -> "occurred"
Remove some entries from PO files where these entries contain spelling errors
and there are other entries that are identical except for these mistakes.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This patch adds sr.po files to Makefile.am files throughout the repository
where needed. It also adds credits for Serbian localization in README files as
needed.
Signed-off-by: Страхиња Радић <contact@strahinja.org>
This reverts commit a0b283a60f,
as it breaks saving the history in ~GNUstep/.AppInfo/WindowMaker/History
by restricting modifications to either ~GNUstep/Defaults or ~GNUstep/Library.
Thanks to Paul Selig for reporting this issue.
According to the EWMH specs, windows can indicate that they are
non-resizable by setting minheight = maxheight and minwidth = maxwidth
in the ICCCM WM_NORMAL_HINTS property. That should be for example
the case for WPrefs app which is not resizable.
Window Maker currently is overwriting that flag in src/window.c for
apps that are exposing GNUstepHints instead.
This patch is making sure the apps created with WINGs is removing
the WMResizableWindowMask to hide the resizebar.
The compiler is reporting the warning below
wtext.c:171: warning: macro "NOTIFY" is not used [-Wunused-macros]
That macro is only used once within that C file, code which is commented
out already.
XKeycodeToKeysym was deprecated some time ago and we replaced
those function calls to XkbKeycodeToKeysym.
Usage of XkbKeycodeToKeysym is not the best as it appears
the XKEYBOARD can be disabled via xorg.conf (at least on Linux).
So just replacing XKeycodeToKeysym() with XkbKeycodeToKeysym()
could cause run-time errors on top of the compilation warning
we may have.
Better fix is to address the problem without introducing a
dependency on XKEYBOARD. W_KeycodeToKeysym is the equivalent
code for XKeycodeToKeysym/XkbKeycodeToKeysym using
XGetKeyboardMapping instead.
As a new function is added to the library WINGs library version
is bumped.
The number of calls to WMRetainColor for a color in use should the same as the number of calls to WMReleaseColor
to free that color. In case of discrepancy, random crashes can happen and memory is not freed properly.
To debug that issue I checked the retained colors when the switchpanel is opened and then checked if those colors are properly released once the panel is closed.
This patch fixes the issue mentioned at https://github.com/window-maker/wmaker/issues/22
In case the color cannot be allocated exactly by createRGBAColor function,
the findCloseColor function is used as a failover function to find a color close to the requested color.
By definition that color is then not exact.
createRGBAColor exact flag should be 1 while findCloseColor exact flag should be 0
It is resource-consuming to query the server for an Atom, yet the protocol
ensures the values will stay unique, so we'd better ask them once and
retain the values for further use.
Because we have allocated enough space, it is a waste of time to check the
size after copy and cat; beside the use of plain strxxx functions may allow
compiler to make a better job.
The original code was over-complicated, it can be reduced to a one-line
call to a function that does the same thing, with the bonus that it will
behave better in the case where domain == NULL.
The original code refused to create anything not in $WMAKER_USER_ROOT, now
we go one step further and limit creation inside its 'Library' or
'Defaults' sub-directories.
Directory /etc/WindowMaker is for global defaults configuration, it is not
a "data" folder which is $PREFIX/share/WindowMaker.
The name change make it more consistent with other names.
Replace calls to wusergnusteppath() which just append "/Library" by calls
to wuserdatapath().
Take opportunity to replace hardcoded "/WindowMaker" directories with
the existing PACKAGE_TARNAME macro (which comes from autotools).
The choice of 'TARNAME' is because it meant to be used in filename, thus
less likely to have problematic characters than PACKAGE_NAME (meant for
display purpose) and PACKAGE which is there for historical reason.
The man page says environment variables are used, and if they don't exist
it falls back to defaults, yet this was not true in WINGS.
This changes implements the checks for the default paths used when the env
variables are not defined; these default paths have been fixed (+lib) to
match the GNUstep layout ('fhs'), expect for the very last path which keeps
the legacy layout.
For the user Apps folder, rely on wusergnusteppath() (~/GNUstep) to build
the path.
The previous code was only partially functional as the hard-coded paths
did not exist in any of GNUstep standard file system layout and the
GNUSTEP_*_ROOT environment variables were not provided by GNUstep for a
while. This means it would never work no matter how environment variables
were set when using layouts: 'debian', 'fhs', 'next', 'Apple', 'mac',
'fhs-system', or 'standalone'.
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.