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

122 Commits

Author SHA1 Message Date
Christophe CURIS
f751cc6a50 wmaker: Moved variable ValidModMask into the global namespace 2013-10-11 21:58:14 +01:00
Christophe CURIS
24ce829f7f wmaker: Removed global variable 'WDelayedActionSet' and associated dead code
The variable's value was set to 0 but never changed afterwards, so
the function using it would never do anything.
2013-10-11 21:58:14 +01:00
Christophe CURIS
a79c0e76d0 wmaker: Moved variables for Inotify into the global namespace 2013-10-11 21:58:13 +01:00
Christophe CURIS
3995130b79 wmaker: Moved variables for the Xkb extension into the global namespace 2013-10-11 21:58:13 +01:00
Christophe CURIS
81aa311c42 wmaker: Moved variables for the XShape extension into the global namespace 2013-10-11 21:58:13 +01:00
Christophe CURIS
c3c2d8d7f1 wmaker: Moved variable Ignore Wks Change into the workspace object in the global namespace
Took the opportunity to change its type: it was an integer, but it is
actually holding a yes/no status, so it is now defined as a boolean.
2013-10-11 21:58:13 +01:00
Christophe CURIS
b6423a7b4f wmaker: Moved variable Screen Count into the global namespace 2013-10-10 20:05:26 +01:00
Christophe CURIS
45bfc1d1c5 wmaker: Removed variable for X Context that is not used 2013-09-30 00:53:10 +02:00
Christophe CURIS
ec91b9f68e wmaker: Moved definition of X Contexts into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
e2ce62eb5b wmaker: Moved definition of WMaker-specific XAtoms into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
379f7022bd wmaker: Moved definition of GNUStep-related XAtoms into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
ecfb2dc902 wmaker: Moved definition of WM-related XAtoms into the global variables structure 2013-09-30 00:53:10 +02:00
Christophe CURIS
b48b3370e2 wmaker: Moved global var with list of cursors to the preferences variable
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.
2013-09-30 00:53:10 +02:00
Christophe CURIS
2c20413831 wmaker: Moved timestamp variable (#2) to the global variable structure 2013-09-29 16:31:49 +01:00
Christophe CURIS
af6c4ec37f wmaker: Moved timestamp variable (#1) to the global variable structure 2013-09-29 16:31:49 +01:00
Christophe CURIS
577506cbd2 wmaker: Moved the variable for Locale choice (I18N) to the global variable structure 2013-09-29 16:31:49 +01:00
Christophe CURIS
3892f3220a wmaker: Created a global structure to regroup all global variables
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.
2013-09-29 16:31:49 +01:00
Christophe CURIS
28bbf705eb wmaker: Converted #define to an Enum for the Program State tracking variables 2013-09-29 13:46:50 +01:00
Christophe CURIS
5fcf15f0d5 wmaker: Changed global constant declaration to use appropriate type
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>
2013-06-30 15:13:41 +01:00
Christophe CURIS
74cd836e48 wmaker: Replaced local 'extern' definition of wPreferences by proper header usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:10:09 +01:00
Christophe CURIS
9b5db31d95 wmaker: Added 'const' attribute to most global functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
6dda67bc51 wmaker: Added attribute 'noreturn' to appropriate functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 18:46:56 +01:00
Rodolfo García Peñas (kix)
5455a585dc funcs.h removed
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>
2013-05-26 19:48:00 +01:00
Rodolfo García Peñas (kix)
20a695f70f New header file monitor.h
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>
2013-05-26 19:48:00 +01:00
Rodolfo García Peñas (kix)
157209a035 New header file event.h
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>
2013-05-26 19:48:00 +01:00
Rodolfo García Peñas (kix)
68cdba0e29 New header file startup.h
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>
2013-05-26 19:48:00 +01:00
Christophe CURIS
d517d5cac0 wmaker: Cleaned dangerous function prototype usage
- 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
2013-05-12 01:01:20 +01:00
Christophe CURIS
a3281b1e89 src/main.c: Moved local prototype for global function to header 'funcs.h'
It is a bad idea to declare the prototype of an external function
in a file as it won't allow the compiler to cross-check it.
2013-05-12 01:01:19 +01:00
Daniel Déchelotte
e14e6b3da8 Add drawers to wmaker!
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.
2013-04-12 02:14:10 +01:00
Rodolfo García Peñas (kix)
68208a01a0 New shutdown.h file
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
2013-01-12 14:37:31 +00:00
Rodolfo García Peñas (kix)
b71f2c30fd Removed XRANDR externs
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.
2013-01-12 13:10:29 +00:00
Rodolfo García Peñas (kix)
4111f336d0 create_stdcmap is never used
The create_stdcmap variable is never set, so can be removed.

This patch don't update the translation .po files!
2012-11-18 23:40:12 +01:00
Christophe CURIS
139f912e61 Remove dependency to CPP: removed stuff related to CPP calls
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
2012-07-14 20:22:21 +02:00
Rodolfo García Peñas (kix)
6bdc1318c1 Moving header functions to main.h
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.
2012-06-24 12:32:36 +01:00
Rodolfo García Peñas (kix)
761fd37e51 WindowMaker: Clean curly brackets
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.
2012-04-15 23:15:20 -03:00
Iain Patterson
bca60318ca Compiler diet.
Don't feed the compiler.  RelaunchWindow() is declared to return Bool so
Bool it shall proudly return.
2012-04-11 23:55:58 +01:00
Iain Patterson
0601e0f002 Style consistency.
Approved style is not to write a single-operation for loop in a single line.
2012-04-11 23:55:47 +01:00
Iain Patterson
aaf934eb2f Compiler food.
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.
2012-04-04 13:02:58 +01:00
Iain Patterson
8352c9ef60 Allow relaunch with shortcut key.
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.
2012-04-04 12:12:12 +01:00
Rodolfo García Peñas (kix)
a2c297e6a7 Remove unused variables 2012-01-28 14:54:07 +00:00
Tamas TEVESZ
f65b99e615 Remove warnings
* 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)
2011-03-24 16:19:52 +01:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
94a0c7b42f Fix some double newlines
Just a couple that woud now print double (or several more) newlines.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
1f21919809 Remove wsyserrorwithcode, rename wsyserror to werror
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>
2010-10-07 12:04:30 +02:00
Alexey I. Froloff
ca1c29cd98 Menu translation support
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>
2010-09-11 15:28:01 +02:00
Carlos R. Mafra
b17077ede0 Avoid more gcc warnings
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’
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
c201e1612c Make wmaker XRandR aware
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.
2010-08-22 22:13:45 +02:00
Tamas TEVESZ
c7868fa405 Make inotify optional
This time keeping the ability to fall back to the old polling method.
2010-03-23 21:50:17 +01:00
Carlos R. Mafra
5178465bb6 Remove DEBUG statements, #if 0 etc
...and some other cleanups.
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
e1d5ce7a51 Cleanup includes of wcore.h, defaults.h and pixmap.h
Several files were including others for no reason, and this slows
down the build time (but probably not measurable on a fast machine).
2010-03-17 11:12:53 +01:00