1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

3218 Commits

Author SHA1 Message Date
David Maciejak
0d0169a413 WPrefs: add new mouse actions configuration
This patch is adding GUI configuration for new mouse actions:
-Previous Workspace
-Next Workspace
-Previous Window
-Next Window
-Switch Windows

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
f40095ac9e wmaker: add new button and wheel mouse actions
This patch is adding atomic mouse actions to mouse buttons to:
-focus on previous or next window
-move to previous or next workspace

and adding wheel action to
-switch between windows

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
39f6130a28 wmaker: use defined wWindowSingleFocus() function
This patch is cleaning focuswindow() local function to call
wWindowSingleFocus() global function.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
36b9f6cb23 wmaker: add next and previous window focus functions
This patch is adding a wWindowFocusPrev() and wWindowFocusNext() functions.
And copying switchmenu.c focusWindow() as wWindowSingleFocus().

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
7082561a42 WPrefs: set default to 1st color in gradient texture
This patch is updating the gradient texture user experience
by auto selecting the first color in the list when possible
and fixing the autoselection after a delete action.

In fact what that is called gradient colors is just a list of colors
with hue/saturation/brightness value.
That patch is loading the first one from the list (color, hue,
saturation, brightness) and setting the 3 sliders according to that
value instead of using some default hardcoded values.
The default color value on the top-right is never modified.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:03 +01:00
David Maciejak
10e0bdf39b wmaker: update NEWS for 0.95.6
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
88d9deea83 wrlib: merge gradient duplicate code
This patch is adding a new static function named renderGradientWidth
to factorize some code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
Alwin
bec572ea8b Make two text strings translatable
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
Alwin
a392c30b0d Catch-up and some improvements of the Dutch .po files
Recently added msgid's were translated, and some existing translations
improved. As development is done in git 'next', strings from wmaker-0.95.6
will be remained at the end of the files, so they are backward compatible.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
0399d70868 wmaker: merge reading menu duplicate code
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>
2014-11-02 12:50:02 +01:00
David Maciejak
09761a75f0 WINGs: merge bagtree duplicate code
This patch is adding a new static function treeDeleteNode to factorize some code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
2a3c11e202 WINGs: merge hashtable duplicate code
This patch is adding a new static function hashGetItem to factorize some code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-11-02 12:50:02 +01:00
David Maciejak
118beb2c60 wmaker: improve key shortcut labelling
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>
2014-11-02 12:50:02 +01:00
Carlos R. Mafra
3bd9e8358f Window Maker 0.95.6 wmaker-0.95.6 2014-08-30 13:29:09 +01:00
David Maciejak
9c381862b3 wmaker: implement EWMH _NET_WORKAREA
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.
2014-08-29 12:43:50 +01:00
David Maciejak
fec8347d27 wmaker: make disable mouse actions a live set
This patch is allowing to enable or disable the 'disable mouse actions'
from the WPrefs app without requiring to restart the session.
2014-08-29 10:11:55 +01:00
David Maciejak
51b342fee5 WPrefs: add new mouse buttons configuration support
This patch is updating the mouse button configuration panel
to be able to set action to the new mouse buttons supported.
2014-08-27 13:55:55 +01:00
David Maciejak
2406256d48 wmaker: add support for more mouse buttons
This patch is adding support for back/forward mouse buttons
and the left/right wheel tilt buttons.
2014-08-27 13:55:54 +01:00
David Maciejak
1e06e1e29b wrlib: remove duplicate code from xpm support
This patch is removing the duplicate code by
using functions create_rimage_xpm and is_xpm_error
previously created.
2014-08-26 17:55:34 +01:00
David Maciejak
4005557bb3 wrlib: add merged code for xpm support in 2 distinct functions
This patch is adding some merged code in
create_rimage_from_xpm and is_xpm_error fonctions.
2014-08-26 17:55:34 +01:00
David Maciejak
556b0d77a1 wmaker: update src/action.c coding style
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.
2014-08-25 10:42:29 +01:00
David Maciejak
9cb4388180 wmaker: fix control shortcut label in window menu
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.
2014-08-25 10:42:29 +01:00
David Maciejak
371818fe36 wmaker: fix deiconify window on double-click
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.
2014-08-25 10:38:12 +01:00
David Maciejak
238b8ed3ca WINGs: merge duplicate code from wtext
This patch is saving about 30 duplicate code lines from
WMPrependTextBlock and WMAppendTextBlock to create
a static fct called prepareTextBlock.
2014-08-24 02:27:30 +01:00
David Maciejak
adebdf41c6 wmaker: src/action.c merge duplicate code
This patch is merging some duplicate code related
to animation position.
2014-08-22 23:41:58 +01:00
David Maciejak
ef659ca1fb wmaker: fix src/dock.c code typo
This patch is renaming the colectIconsCallback name function.
2014-08-21 00:57:15 +01:00
David Maciejak
6b5e589d09 wmaker: update docked application balloon text
This patch is displaying the number of application instance
run directly in the balloon text (and I also run checkpatch.pl).
2014-08-21 00:49:59 +01:00
David Maciejak
162cca286d WPrefs: fix key capture
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).
2014-08-20 23:34:49 +01:00
David Maciejak
9c337624cf wmaker: change default app icon
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"
2014-08-20 18:11:37 +01:00
Carlos R. Mafra
5da2fcb7e3 apercu: Make preview size a configuration option
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).
2014-08-20 18:11:37 +01:00
David Maciejak
c6c7652e24 wmaker: add miniwindow apercu
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.
2014-08-20 11:52:01 +01:00
David Maciejak
b6d48420bb wmaker: src/dialog cosmetic code change
This patch is just renaming the variable used for the info panel
from 'thePanel' to 'infoPanel'.
2014-08-20 11:51:47 +01:00
David Maciejak
c92ea52271 wmaker: update drag-nd-drop label related
This patch is updating the drag and drop labels
from docked app settings window. As i am not sure common users
are aware of what 'DND' means.
2014-08-20 11:51:47 +01:00
David Maciejak
3f306184bd wmaker: unset default app logo size
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.
2014-08-20 11:51:47 +01:00
David Maciejak
58faae8ff5 wmaker: switch back icon name to the window name when needed
This patch is setting the icon name to the window name when
_NET_WM_ICON_NAME is not provided by the app.
2014-08-20 11:51:47 +01:00
David Maciejak
6dc89b1522 wmaker: fix moveres.c compilation warning
This patch is fixing compilation issue:

moveres.c:1801:65: warning: unused parameter 'dx' [-Wunused-parameter]

by removing variable 'dx' from getResizeDirection function.
2014-08-20 11:51:47 +01:00
David Maciejak
d3e5e73bfc wmaker: Add drag-nd-drop support
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.
2014-08-15 01:08:23 +01:00
David Maciejak
166abcd17a wmaker: Add drag-nd-drop support in info panel
This patch is adding a message in the info panel
if drag-nd-drop was compiled in.
2014-08-15 01:08:23 +01:00
David Maciejak
2abb323777 wmaker: Improve drag-nd-drop support
This patch is cleaning the previous DnD support,
and adds the get type list protocol negociation.
Currently only supporting uri-list type.
2014-08-15 01:08:23 +01:00
David Maciejak
be5b58aaee wmaker: fix xdnd accepted type
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
2014-08-07 09:42:35 -06:00
David Maciejak
fe177c6966 wrlib: fix RCreateImageFromDrawable error log msg
This patch is fixing the name of the function from the log message.
2014-07-27 10:07:28 -06:00
David Maciejak
39e1398257 WINGs: correct possible null pointer dereference
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.
2014-07-27 09:45:38 -06:00
David Maciejak
abc2d13f7d wmaker: main.c fix realloc mistake
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().
2014-07-27 09:45:03 -06:00
David Maciejak
8d731b719e wmaker: superfluous.c possible null pointer dereference
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.
2014-07-27 09:45:03 -06:00
David Maciejak
f5cb2f3d1c wmaker: dock.c possible null pointer dereference
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.
2014-07-27 09:45:03 -06:00
David Maciejak
f6b9fc8870 WINGs/Tests: make them compile again
This patch is adding the missing X11 libs reference.
2014-07-27 09:41:38 -06:00
David Maciejak
d0bb7ae0c8 wrlib/tests: fix testgrad memory leak
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.
2014-07-27 09:41:38 -06:00
Christophe CURIS
16045a6be4 Increment versions of libraries for next release due to public API Changes
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>
2014-07-20 15:31:57 +01:00
Christophe CURIS
9740c02403 wrlib: re-introduce the optimize_for_speed flag for binary compatibility
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>
2014-07-20 15:31:57 +01:00
Ioan Moldovan
89295b91fb wmaker: improve the behaviour of window resizing by user
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.
2014-07-20 15:31:57 +01:00