As the cursor choice for each action is actually a user choice,
it is logical to put this into the structure, instead of a poorly
defined 'extern' in every file.
Having all the global variables at the same place will provide
better visibility on the code; grouping them in a structure
reduces the risk for name clash; it also offer the possibility
to organise them.
Another BIG benefit is that, when reading the code, an access to
a global variable will now be clearly visible, and distinguished
from a local variable use.
The original type was not as safe as it looked like to be, and led
to more memory usage than necessary.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The file funcs.h is removed. A new file osdep.h is created to hold
the definition for all osdep_*c files.
The files .c has been adjusted to include the right header files,
removing funcs.h, including osdep.h.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
The file monitor.h includes the function prototypes for monitor.c.
The prototypes included were moved from funcs.h.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
The file event.h includes the function prototypes for event.c.
The prototypes included were moved from funcs.h.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
The file startup.h includes the function prototypes for startup.c.
The prototypes included were moved from funcs.h.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
- remove extern declaration in source file, use header instead
- add inclusion of header defining the functions of the file to
get the compiler to cross-check them
- marked static the functions that should not be visible ouside
their file
Drawers are horizontal docks, and they can themselves only live in the dock
To use them, right click on the dock or a docked appicon and select "Add
a drawer". Then move appicons into the drawer (drag them with the
mouse). You may change the icon of the drawer. By default, drawers
auto-expand and -collapse, and auto-raise/lower. This can be customized
in the same way as for the clip.
Set DisableDrawers to YES in G/D/WindowMaker if you do not want to see
the menu entry to add a drawer.
Just discovered this bug: the auto-attract icon functionality will not
work (to be precise, it crashes WM!) if the clip is disabled
(NoClip=YES). Will fix shortly, of course.
The new shutdown.h file includes the shutdown modes and the functions
to shutdown Window Maker.
The function definitios were moved from funcs.h and the struct WShutdownMode
from WindowMaker.h.
Now, externs are not needed, only include shutdown.h
This patch moves the XRANDR variable definitions to screen.h, because
xrandr is related to screen behavior. Then, the definition externs
can be removed.
This patch also changes (in event.c) the ConfigureNotify event processing
to avoid call the "if" block if XRANDR is not enabled. I chose the option of
move the if into the HAVE_XRANDR block instead of include the
ConfigureNotify case inside of the HAVE_XRANDR block (proposed by
BALATON Zoltan) to avoid call the default option if not needed.
Now that the built-in parser has support for all the feature of CPP
being used by WindowMaker's default menu, we can remove the stuff
related to calling CPP:
- code for preparing and running CPP;
- compile-time option to de-activate the call to CPP;
- command-line option
The functions of main.c should be included in main.h, not in funcs.h.
This patch adds the main.h file and moves the function prototypes to
this file.
The not needed "include funcs.h" are removed.
This patch removes the unneeded curly brackets in multiple files.
It also add some comments in the code. In usermenu.c removes some
variables not used.
main.c: In function ‘RelaunchWindow’:
main.c:461:1: warning: control reaches end of non-void function
[-Wreturn-type]
Actually we can't reach the end of the function because the three
possible cases are Exit(-1), return False and return True. Of course if
Exit() were ever changed the above statement might become incorrect.
Some compiler food silences the warning.
Use the WindowRelaunchKey shortcut to examine the WM_COMMAND property of
the active application's main window and launch a new instance of the
application using the retrieved command line.
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
to be tweaked on a per-implementation basis as problems arise)
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
When generating menus, lookup translations for menu entries in
specified textdomain. Often used by linux distributions.
Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
WUtil.h:212: warning: function declaration isn’t a prototype
WUtil.h:259: warning: function declaration isn’t a prototype
WUtil.h:300: warning: function declaration isn’t a prototype
WINGsP.h:593: warning: function declaration isn’t a prototype
WINGsP.h:599: warning: function declaration isn’t a prototype
WINGs.h:616: warning: function declaration isn’t a prototype
raster.c:295: warning: no previous prototype for ‘calculateCombineArea’
This patch makes wmaker automatically Restart() to take into account
resolution changes done by xrandr.
The motivation to write this patch is that when I start my laptop connected
to an external monitor (VGA1), the resolution in the monitor is initially
wrong (perhaps this is a bug in XOrg or OpenSuse, but anyway), so I always
do this after starting wmaker:
xrandr --output VGA1 --preferred
The resolution in the external monitor gets fixed, but wmaker does not
recognize the change automatically and I have to manually restart it.
So this patch avoids the last step by making wmaker be XRandR-aware.
Wmaker now restarts automatically when it receives a RRChangeScreenNotify
event and I don't have to do the last part of the silly procedure described
above.
I am not sure if restarting wmaker is the most elegant solution, but
it at least solves part of my issue with wmaker + xrandr.