1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 07:02:30 +01:00
Commit Graph

1404 Commits

Author SHA1 Message Date
Amadeusz Sławiński
32c720dd86 wmaker: Value stored to 'w1' is never read
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-05-18 23:00:17 +01:00
Carlos R. Mafra
05ff62caaf Coding style: Change 'foo * bar' to 'foo *bar' in function arguments
Since 'foo' and 'bar' are not being multiplied...

Done automatically with the sed script:

/^[a-zA-Z][a-zA-Z]*.*(/{
s/ \* \([a-zA-Z]\)/ *\1/g
}

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-05-18 23:00:16 +01:00
David Maciejak
11497973ad src/winmenu.c: updated prepare_menu_position
did some change as prepare_menu_position never updated x and y values

Acked-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:16 +01:00
David Maciejak
9456252d51 src/usermenu.c: updated wUserMenuRefreshInstances
remove unused var and move wwin check

Acked-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:16 +01:00
David Maciejak
867f221ead src/misc.c: updated GetShortcutString
remove unused var and remove some commented code too

Acked-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:16 +01:00
Christophe CURIS
92ecb3c3ed WMaker: rewrote generation of title for the Icon Chooser to avoid problems
The original code did have a few weaknesses, including:
 - possible buffer overflow, if the translation was too long;
 - possible crash, if either instance or class is NULL but not both

Now the appropriate length is calculated (not counting on a margin) and the
string is generated with the available elements.

As a side note, the variable was renamed from 'tmp' to 'title' for clarity.

This was highlighted by cppcheck (thanks to David Maciejak) and by
Coverity (bug #50078).

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:16 +01:00
David Maciejak
aa1ee24fc0 src/appicon.c: updated paint_app_icon
moving scr initialization after WApplication existing test
to prevent crashing in case wapp is null

Acked-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:16 +01:00
Christophe CURIS
904e8d2be4 WMaker: moved XGrab/XUngrabPointer into the conditional code
It is not necessary to call them when the command is not executable.
Took opportunity to change parameter to XSync which is supposed to be a
'Bool' type from Xlib, which means either True or False.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-18 23:00:15 +01:00
David Maciejak
7783c2258b clean wDockFindFreeSlot function
it appears that a sx var is set but not used
2014-05-17 15:59:47 +01:00
Doug Torrance
b764a766bf Add keyboard shortcut to run application.
A common feature in several desktop environments is the ability to bring up
a "run application" dialog via a keyboard shortcut (frequently Mod1+F2).  This
feature has been available to Window Maker users only through the root menu.

This patch adds the ability for a user to set up a keyboard shortcut to
accomplish this, either via WPrefs or by editing ~/GNUstep/Defaults/WindowMaker,
e.g., with
 RunKey = "Mod1+F2";

Code from the execCommand function in rootmenu.c has been copied almost directly
into the handleKeyPress function in misc.c to accomplish this.
2014-05-10 10:01:51 +01:00
Christophe CURIS
9f8363dc14 WMaker: rationalised the use of flags for window icons in the switchpanel
The flags were stored as 'char' but it is more logical to use int which is
"the natural size for integer on the host" and may help future evolution
if new flags are added;

The array is created with an initial size consistent with the number of
element we feed it with in 'makeWindowFlagsArray', this avoids a bunch
of realloc;

Fixed the type conversion that was not right, as pointed by clang.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-09 20:44:38 +01:00
David Maciejak
64e4019614 wmaker: minor improvements to labels in the info panel
The goal is to make them shorter/more correct
2014-05-08 20:14:22 +01:00
David Maciejak
bb69682b88 wrlib: added support for imagemagick third-party lib
It uses to provide some missing common image format
like SVG, BMP, PICT, ...
2014-04-29 10:15:27 +01:00
Christophe CURIS
36159c614f wmaker: Scale image to make them fit in the preview panel
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-04-29 10:15:27 +01:00
David Maciejak
a3ce005980 WINGs: Add support for syslog messaging
This patch is used to add support for syslog messaging implemented in
WINGs lib directly, so available from the lib itself and wmaker too.
I believe it will in a first time help to get some logging info
centralized in one point, and in a second time maybe add some info
level messages like wmaker is starting, stopping, restarting and else.

For now, it's built by default when the syslog support is found, maybe
we could also disable it by default.
2014-04-24 10:47:45 +01:00
Yuri Karaban
ccd96d1563 autoPlaceWindow: try placing window at center first 2014-04-24 10:47:45 +01:00
Yuri Karaban
78be868972 autoPlaceWindow: rename mysterious parameter tryCount to ignore_sunken 2014-04-24 10:47:45 +01:00
Yuri Karaban
b1a67e4bc7 autoPlaceWindow: rewrite iteration to more comprehensible form 2014-04-24 10:47:45 +01:00
Yuri Karaban
a7471fd82a split autoPlaceWindow to smaller functions 2014-04-24 10:47:45 +01:00
David Maciejak
c2e4f62777 RandR misc.
This patch is replacing XRandR naming to RandR,
as XRandR is the name of the tool used in X11 and RandR
is the technology WMaker wants to support.
I had to update the info panel too, when many features are
activated not all of them can be displayed properly.
2014-04-24 10:47:45 +01:00
David Maciejak
278fdfa1db Updated copyright date 2014-04-24 09:29:11 +01:00
Brad Jorsch
6d5ffca076 Set no_focusable for "notification" and "tooltip" windows
Notification popups, and tooltips for that matter, shouldn't be taking
focus away from apps the user is actually interacting with.
2014-04-24 09:27:15 +01:00
Rodolfo García Peñas (kix)
1644eec5ec Fixed compiler warnings in dock.c
This patch removes unused variables as reported by the compiler in
the file dock.c
2014-02-13 08:58:25 +00:00
Brad Jorsch
288943c813 Add _NET_WM_WINDOW_TYPEs added in EWMH 1.3
EWMH 1.3 added various window types: dropdown_menu, popup_menu, tooltip,
notification, combo, and dnd. We may as well set appropriate defaults if
these types get set on a window that isn't override-redirect.

I'm not terribly attached to these defaults, except that the ones for
'notification' are what I set manually for xfce4-notifyd before deciding
to patch wmaker.
2014-02-13 08:55:47 +00:00
Brad Jorsch
2e0d2f3df9 Minimal support for _NET_WM_WINDOW_OPACITY
While we don't provide compositing ourselves, add-on compositors such as
xcompmgr need us to copy the _NET_WM_WINDOW_OPACITY property from the
client window to the frame window.

We can do this easily enough.
2014-02-13 08:55:47 +00:00
Rodolfo García Peñas (kix)
0bb96cdfe7 Removed unused code in screen.c
This patch removes the unused code in screen.c.

The variable "dock_head", is defined, but not used. When we removes
the variable, then we can see that a lot of code is not used! so we
can remove it :-)

This patch also removes some extra curly brackets and join the variable
definition and the initialization in one line for some variables.
2014-02-13 08:55:47 +00:00
Rodolfo García Peñas (kix)
761f3c6e85 Remove compiler warnings in defaults.c
This patch removes these warnings:

defaults.c: In function ‘getFont’:
defaults.c:2011:84: warning: unused parameter ‘addr’ [-Wunused-parameter]
 static int getFont(WScreen * scr, WDefaultEntry * entry, WMPropList * value, void *addr, void **ret)
                                                                                    ^
defaults.c: In function ‘getColor’:
defaults.c:2036:85: warning: unused parameter ‘addr’ [-Wunused-parameter]
 static int getColor(WScreen * scr, WDefaultEntry * entry, WMPropList * value, void *addr, void **ret)
2014-02-09 22:53:15 +00:00
Amadeusz Sławiński
0faff93cf7 move dock/icons size adjustments, to fix window placement
Functions placing windows (PlaceWindow - src/placement.c, wMaximizeWindow -
src/actions.c) need to calculate area differently than ones placing icons
(PlaceIcon - src/placement.c, wArrangeIcons - src/actions.c).
So this patch puts adjustment code in wGetUsableAreaForHead which is
used by all those functions but called with different 'bool noicons'
argument depending on if it's called in window or icon placement
function.

Reported-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2013-12-30 18:11:07 +00:00
Christophe CURIS
c7e6b3a18f wmaker: Added missing const attribute
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
73c00fac27 Code refactoring: replaced macro 'HAVE_XRANDR' by 'USE_XRANDR' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
e106d88a42 Code refactoring: replaced macro 'XINERAMA' by 'USE_XINERAMA' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
6184c955e7 Code refactoring: replaced macro 'SHAPE' by 'USE_XSHAPE' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
54f9e2e9cc wmaker: Do not create a temporary variable for Xrandr support detection
The other extension detection have the same situation and they already
have a variable for that, do not do differently for Xrandr because it adds
unnecessary complexity in the code.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
330fc85e56 Remove some unnecessary code related to XShape usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
f76ed31fa3 wmaker: Do not call XShape function if the server did not say it supports it
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Iain Patterson
68a902aa2e Fix arrow keys in switchpanel.
A previous commit broke the behaviour of the left and right arrow keys
in the switchpanel.  Releasing either of the keys would correctly select
a new window but the panel would then close.  The original, and desired,
behaviour is for the panel to remain open after selecting a new window
with the arrow keys.

Reported by Yury Tarasievich.
2013-12-30 18:11:04 +00:00
Amadeusz Sławiński
9c8398c0dc Fix implicit declaration
usermenu.c:257:12: warning: implicit declaration of function ‘GetShortcutString’ [-Wimplicit-function-declaration]

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2013-12-30 18:11:04 +00:00
Amadeusz Sławiński
cf719c2979 take dock into account when not covering icons next to it
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2013-12-30 18:11:04 +00:00
Amadeusz Sławiński
09b28b92f1 make adjustments for dock when calculating area for miniwindows
Fixes bug report:
The 0.80.2 and older versions allowed the miniwindows to lay down in
parallel with wmdock (if one wanted it that way) but newer Windowmaker
versions could only partially simulate such behavior and that includes
to either setting an option NoWindowOverDock to yes or to manually set
the dock to "Keep on Top".

Reported-by: Josip Deanovic <djosip+news@linuxpages.net>
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2013-12-30 18:11:04 +00:00
Amadeusz Sławiński
952319ae60 move maximization size adjustments to maximization function
now wGetUsableAreaForHead returns better result

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2013-12-30 18:11:04 +00:00
Christophe CURIS
bd4abc5304 wmaker: Do not allocate memory for a short lived string in 'selectSpecification'
It is not only not very efficient, but in present case it also participates
in memory fragmentation.

This patch replaces this with a stack allocated buffer with a buffer which
is way too large.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
db9e002ecf wmaker: Created an array to hold the maximize menu entries
The idea is that an array is easier to work with, when it's about to add,
remove or change entries, because all data end up stored in one place
instead of dispatched around the code.

It also makes code smaller as it avoids repetitions.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
1f17fb940c wmaker: Avoid multiple calls to gettext
The original code called gettext twice every time, the new code calls it
only once.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
667bb9191b wmaker: Minor improvements to function 'shade_animate' when empty on purpose
When animations are disabled, we still create the function but we make it
empty to keep the rest of the code simple. This patch does:
 - mark the function inline, to increase the probability that the compiler
will not generate the function at all;
 - mark arguments as unused to avoid some compilation warnings.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:04 +00:00
Christophe CURIS
be022d9623 wmaker: Use the macro 'wlengthof' to get the number of element in an array
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:03 +00:00
Amadeusz Sławiński
311ab6b08c Raise fullscreened window
Make sure that fullscreened window covers all normal windows
2013-12-30 18:11:03 +00:00
Amadeusz Sławiński
a504370f3b Remove WMFullscreenLevel
Make fullscreen windows be on the same level as normal ones.
2013-12-30 18:11:02 +00:00
Rodolfo García Peñas (kix)
246068a634 Legal Panel size with variables
This patch uses two variables to set the width and the height for the
Info Panel. It also includes a margin space.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-11-02 19:31:38 -02:00
Rodolfo García Peñas (kix)
415ac91afc Window Maker Developers Team Copyright
This patch includes the Dev Team Copyright in the info panel.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-11-02 19:31:38 -02:00
Rodolfo García Peñas (kix)
5ed02b58be Info Panel size with variables
This patch uses two variables to set the width and the height for the
Info Panel.

Now the panel has the same size than the window.

Finally, this patch moves the center definition to the beginning, and
removes the curly brackets.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-11-02 19:31:38 -02:00