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>
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>
moving scr initialization after WApplication existing test
to prevent crashing in case wapp is null
Acked-by: Christophe CURIS <christophe.curis@free.fr>
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>
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.
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>
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.
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.
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.
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.
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.
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>