This patch is adding a readMenu function to be called from
readMenuPipe and readMenuFile, saving about 20 lines of code.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This patch is improving the key shortcut labelling in the root menu.
It modifies the GetShortcutString function to save some cycles
as wXModifierFromKey is already doing all the string comparisons.
This patch introduces a new function called wXModifierToShortcutLabel
that is checking the return value from wXModifierFromKey.
Not sure why Control was set as a special key, as keyboards could
have 2 controls but also 2 shift keys.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This patch is adding the _NET_WORKAREA property
which according to EWMH spec MUST be implemented.
Some application like rdesktop or nautilus are using
it, that's maybe why you encountered some errors like these:
** (nautilus:6457): WARNING **: Can not get _NET_WORKAREA
** (nautilus:6457): WARNING **: Can not determine workarea, guessing at layout
For now, the property is only updated when a workarea is created or destroyed.
This patch is updating the coding style based on checkpatch output
and as suggested by Rodolfo it also inverts the condition test
in getAnimationGeometry fct to return earlier when possible.
This patch is fixing the shortcut label used in window menu.
As now when a 'control' shortcut was used, the label displayed
was 'bug' cause GetShortcutString fct which is calling wXModifierFromKey
fct was waiting for a 'Control' static string not the default one
set to 'Ctrl' string.
This patch is fixing the RenderBadPicture X errors on deiconifying
window using double-click.
Background:
I also experienced this issue these days, after checking it was not
introduce with latest apercu feature I decided to dig into it.
As far as I saw in the archive it was first reported by Rodolfo in June 2012.
Each time a window is deiconify using double-click, the error below
is reported in the session error log:
wmaker(catchXError(startup.c:177)): warning: internal X error:
RenderBadPicture (invalid Picture parameter)
Request code: 152
Request minor code: 7
Resource ID: 0x6000a4
Error serial: 9269
So I decided to track when the issue is happening,
from src/action.c wDeiconifyWindow then in src/icon.c wIconDestroy
then in src/wcore.c wCoreDestroy.
At that stage, all the structures I checked are cleaned up properly
during the icon destroy process.
So I also checked when the issue is generated, I ended in
wrlib/xutil.c RCreateXImage (in the share memory extension code)
XSync(context->dpy, False);
oldErrorHandler = XSetErrorHandler(errorHandler);
XShmAttach(context->dpy, &rximg->info);
XSync(context->dpy, False);
XSetErrorHandler(oldErrorHandler);
At this point I was quite lost, cause it means the error could
have been in the server error queue already.
Facts, seems the issue is appearing only on double-clicking the miniwindow,
but not when "Deminiaturize" is clicked from the right-click contextual menu.
I also checked the code from winmenu.c when the action MC_MINIATURIZE
is selected from execMenuCommand fct, but it was just calling
wDeiconifyWindow function. Hum.
So, after one full day of thought I tested to just change the focus before
double-clicking the miniwindow, and bingo it works.
That means when the icon is destroyed the X server still has a reference
on it that's generating the issue.
This patch is used to fix the Debian bug #140181
It updates the NumLockMask function to report the mask and
call XFreeModifiermap when needed.
It also modifies capture_shortcut function to be able to use Super keys
and report numeric keypad when pressed (aka now detects correctly
if the numlock is enabled or not).
This patch is changing the default application icon to
a one that reminds the NeXTcube but also a blackbox of
something we don't know about.
It's from LuBu OpenMagic 1.0 for Sparc project at
www.alge.no/index.php/OpenMagic_1.0
According to the license,
"LuBu OpenMagic 1.0 is put into the public domain"
Since the resolution of the Retina display tends to make everything small,
the default apercu preview size (twice the icon size) couldn't be used to
distinguish the window contents without tiring too much my eyes.
Therefore, let's make the apercu size a configurable option. You can set
it through the ApercuSize variable with
$ wdwrite WindowMaker ApercuSize 4
in multiples of the icon size (in this case the apercu size will be four
times the icon size).
The default size remains 2 (twice the icon size).
This patch is adding miniwindow apercu when the mouse
is over the miniwindows.
To enable it you have to run WPref, in Miscellaneous Ergonomic
Preferences, check miniwindow apercus.
Then, you will be able to see a screenshot of the app when the mouse
is over the miniwindow.
This patch is setting the app logo max size to 128 as what can
be found in the rest of the code, so the logo is not restricted
anymore to the icon size defined by WPrefs.
The goal is to solve the resize issue that appears when the logo
is used in Info and Exit panel.
This patch is fixing compilation issue:
moveres.c:1801:65: warning: unused parameter 'dx' [-Wunused-parameter]
by removing variable 'dx' from getResizeDirection function.
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.
This patch is ensuring that the data dropped is a file format URI
and converting it as stated by XDND specs.
It solves:
*crash in my env when arbitrary stuff is dropped
*correct handling of non ascii chars
As reported by cppcheck:
[WINGs/array.c:129] -> [WINGs/array.c:131]: (warning) Possible null pointer dereference: array - otherwise it is redundant to check it against null.
[WINGs/array.c:151] -> [WINGs/array.c:153]: (warning) Possible null pointer dereference: array - otherwise it is redundant to check it against null.
[WINGs/array.c:170] -> [WINGs/array.c:172]: (warning) Possible null pointer dereference: array - otherwise it is redundant to check it against null.
This patch is checking that the var name 'array' exists.
As reported by cppcheck:
[src/main.c:141]: (error) Common realloc mistake: 'wVisualID' nulled but not freed upon failure
The patch is using wrealloc instead of the standard realloc().
As reported by cppcheck:
[src/superfluous.c:238] -> [src/superfluous.c:199]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null.
[src/superfluous.c:239] -> [src/superfluous.c:199]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null.
[src/superfluous.c:240] -> [src/superfluous.c:199]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null.
The patch is adding a test to check if variable aicon exists.
As reported by cppcheck:
[src/dock.c:568] -> [src/dock.c:571]: (warning) Possible null pointer dereference: aicon - otherwise it is redundant to check it against null.
The aicon test is useless, the patch is removing it.
cppcheck is reporting:
[wrlib/tests/testgrad.c:148]: (error) Memory leak: color_name
but seems some other variables were never freed.
This patch is cleaning them property.
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>
The commit #d1f9b801 removed it because the code behind it is actually
useless, unfortunately removing the flag itself from the structure is
breaking the compatibility of the API.
To avoid problems, this patch re-introduces the flag in the structure, but
not the code behind it so it is useless, and adds an attribute so that gcc
will report its use as deprecated, to help application migration.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original behaviour was a bit frustrating because it used the first
small mouse move to deduce the user's wished direction, but that is a bit
imprecise.
This patch divides the window in 9 rectangles:
- 4 for corners, used for diagonal resizing
- 4 for middles of sides, for resizing Up, Down, Left and Right
- 1 useless in the middle of the the window, which falls back on diagonal
resizing
This leads to a more predictive behaviour.
Recommend usage for the configure flag 'enable-debug' when testing code and
invite to make use the the checkpatch.pl script.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
It makes the code easier to read to explicitly define a type for the
functions that are used for callbacks, so this patch does this for the
wmmenugen tool.
It was an opportunity to highlight some variable definitions that looked
like function prototypes, and were as such misplaced in the code, being a
source of confusion.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When a command is given for a menu to be run through a terminal, there is
a piece of code that removes everything from a '!' to the end of the line.
The original code was too dense and not really optimal, so this patch
proposes a more explicit code, mainly for maintainability.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.
By merging everything in a single struct array it is a lot easier to
maintain this list.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.
By merging everything in a single struct array it is a lot easier to
maintain this list.
Took the opportunity to properly document a little hack which is used to
avoid complex handling for a special case.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When a list has a fixed size, it is better to use the size of the list
instead of an end-of-list mark because it avoid unnecessary memory usage
and ease compiler's optimisation task.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The code uses an extra variable that is specific the the Xkb code but it
is not really needed, removing it makes the code simpler, thus easier to
maintain.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
In the function that creates the background image for the switch panel
there are a number of checks on the size of the image, but this has
already been checked at the beginning of the function with an early return
in this case.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>