A label was truncated because the widget next to it was too close for
historical reasons; now that the frame is wide enough the Pop-up Button
widget at its left is pushed further apart so the label for the position
of the workspace name can be fully visible.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
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>
Although this is a modification of the public API, this patch does not
change the binary interface, and the attribute does not add a constraint
on the parameter for the caller so we do not break the source compatibility
either.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original code supposed that the library was available and ready to use.
As it may not be the case (modern distro generally don't include dev files
by defaults), add a the appropriate checks to make sure WRaster compilation
will not fail later.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
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 original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
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 original check was not compliant with autoconf's syntax, did not have
a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
The feature is also no more disabled by default, as it is something user
would expect from a modern window manager.
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 original check was not compliant with autoconf's syntax, did not
have a very good behaviour for user and was not easy to make evolve.
The new macro:
- uses as much as possible autoconf macros for portability and code
consistency;
- checks also for header usability with the compiler;
- provides a consistent behaviour on yes/no/auto (if user explicitly
enables support, do not silently disable if not found; if library is found
but not the header, complain to let user install it or explicitly disable
support)
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There are a number of steps in the library check procedure that are a bit
repetitive, and have been placed into the macro WM_LIB_CHECK to make the
code simpler to write.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The function can have a wider use, so moved then to a more neutral place
and gave them more generic names.
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 default case should not arise because the tested variable is an enum,
but it the case someone would get a value wrong, we're safer with a little
warning and proper fallback than with unknown behaviour.
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>
When autoconf encounters a macro name that it does not know, it assumes
that it is just a standard keyword that needs to end up in the generated
configure script.
This patch teaches m4 about the syntax used for our macros so it can now
that it is supposed to be a macro, and then it can stop and report the
problem.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The macro 'AC_ISC_POSIX' is now said to be deprecated, so we use the new
recommended check instead as we make light use of the corresponding
function.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This attribute reports cases where GCC has to generate special code to
handle some C constructs, for which we'd prefer an explicit code instead
of counting on GCC doing the work.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
In the present case, it just led to a compiler warning on unused variable
when the XShape extension is disabled, but in general case it just adds
complexity by duplicating things; this should be reserved for complex
cases.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As suggested by GCC, this function is a good candidate. There is a little
constraint on how to do it however, as it is part of the public API so we
have to do it in a portable fashion (We can't rely on our "config.h" when
the file will have been installed).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This attribute helps the compiler checking the type matching between
arguments and the specification in a printf-like format string, to
avoid invalid output. This attribute is optional, but some compilers
can suggest functions that could have it.
This patch adds the appropriate compiler flags if they are supported when
the source is being compiled with DEBUG enabled.
The patch also introduces a new macro WM_CFLAGS_CHECK_FIRST because in some
cases AX_CFLAGS_GCC_OPTION is not really efficient and in present case it
does not fits the job.
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>
As this label is being displayed in the window, it is a good idea to make
it translatable to the user's locale.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The parameters for the textures were stored all together in an array
which made its usage error prone; now there a struct to clearly identify
which string is what, so it is clear in the source what's being done.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The parameters for the theme colors were stored all together in an array
which made its usage error prone; now there a struct to clearly identify
which string is what, so it the source is clearer on what's being done.
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>