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

2925 Commits

Author SHA1 Message Date
Christophe CURIS
f45d57ff16 wmaker: Marked args as unused for compiler in XCloseEvent callback code
The toolkit dispatches window close request events using callback
functions, which means having a fixed argument list for that function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 23:00:19 +01:00
Christophe CURIS
3857def779 wmaker: Marked args as unused for compiler in XClickEvent callback code
The toolkit dispatches X events for MouseButton using callback functions,
which means having a fixed argument list for that function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 23:00:19 +01:00
Christophe CURIS
c34a55ed5a wmaker: Marked args as unused for compiler in XExposeEvent callback code
The custom drawing code for windows is handled using callback functions,
which means having a fixed argument list for that function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 23:00:19 +01:00
Christophe CURIS
9330ddf946 wmaker: Marked args as unused for compiler in menu callback code
When an entry of a menu is selected, the appropriate action is triggered
using a callback, which means having a fixed argument list for that
function.

It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 23:00:19 +01:00
Christophe CURIS
adb936e9f2 wmaker: Marked args as unused for compiler in callback code
To have an easy-to-maintain code, the configuration loading function is
using a lot off callbacks, which means having a fixed argument list.

It is then correct to not use all of them in all case, so this patch adds
the appropriate stuff to avoid a false report from compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 23:00:19 +01:00
Christophe CURIS
0118906a85 wmaker: Marked args as unused at places where conditional code is used
There are a few cases in the code where conditional compiling can
lead, when the corresponding block is not activated, to some arguments
not being used.

This patch adds the proper stuff to avoid a false report from the
compiler.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 23:00:18 +01:00
Christophe CURIS
30fd8a1f75 wmaker: Marked arg as unused for compiler in callback code
As a callback function has a fixed prototype, it is not an error to have
some arguments unused, but we need to let the compiler about it to avoid
spurious messages that would hide real cases.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 21:38:42 +01:00
Christophe CURIS
1b2f3c0431 wmaker: Removed non necessary macro for buffer size
The C language provides the macro 'sizeof' to handle this kind of
situation, so do not create locally a macro which can become a source
of problems.

Took opportunity to change the size of buffer to follow guidelines
from Inotify's manpage, and to remove the initial value that is useless.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 21:38:42 +01:00
Christophe CURIS
bec778aae2 wmaker: Added reset of file handle variable to avoid multiple file close
If the triggering condition occurred, the file handle for Inotify were
closed, but as the variable containing the handle was not updated it
could lead to multiple call to file close, which behaviour may be
problematic.

The file handle was passed as a parameter, which does not allow for a
clean value change, so now we use the variable directly as it is
available in the global namespace.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-10-13 21:38:42 +01:00
Christophe CURIS
a3264184bd Removed parameters to function 'handle_inotify_events' that were not used 2013-10-13 15:30:56 +01:00
Christophe CURIS
821bacb5f4 Removed parameter to function 'handleDeadProcess' that was not used 2013-10-13 15:30:56 +01:00
Christophe CURIS
3cf4ba91aa Removed parameter to function 'updateResistance' that was not used 2013-10-13 15:30:56 +01:00
Christophe CURIS
0717a0f07e Removed parameters to function 'open_window_menu_core' that were not used 2013-10-13 15:30:56 +01:00
Christophe CURIS
c42d6822de Removed parameter to function 'create_tab_icon_workspace' that was not used 2013-10-13 15:30:56 +01:00
Christophe CURIS
4dadc83a4c wmaker: Added 'static' attribute to local variables
This code is probably never compiled, but that's not a reason to
leave it incorrect.
2013-10-12 15:57:21 +01:00
Christophe CURIS
ad2b5f0ec9 wmaker: Fixed compilation of XDND support
The XDND support is not enabled by default, and not simple to
enable (does not use the appropriate configure flag method).

With previous global namespace related patches, this file not being
enabled a change was missed. Now at least it compiles, although it
is still an experimental feature.
2013-10-12 15:57:21 +01:00
Christophe CURIS
1003f89dc0 WPrefs: Fixed duplicate 'const' keyword
(as reported by LLVM / clang)
2013-10-12 15:57:21 +01:00
Christophe CURIS
6b1b6bc02e WPrefs: Grouped config key and user display icon in a single struct
Instead of defining 2 separate data arrays, use a array of struct
to make it less bug prone (no dependancy on order of elements).

Took opportunity to de-CamelCase the variable name;
Took opportunity to add appropriate const qualifier.
2013-10-12 15:57:21 +01:00
Christophe CURIS
a01c1fcb79 WPrefs: Grouped config key and user display string in a single struct
Instead of defining 2 separate data arrays, use a array of struct
to make it less bug prone (no dependancy on order of elements).

Took opportunity to de-CamelCase the variable name;
Took opportunity to add appropriate const qualifier.
2013-10-12 15:57:21 +01:00
Christophe CURIS
85cef4e2d9 util: Fixed possible off-by-one issue when generating filename
(as reported by LLVM / clang)
2013-10-12 15:57:21 +01:00
Christophe CURIS
5a16cb8e02 Removed unused WScreen argument in some Default handling functions 2013-10-12 15:18:06 +01:00
Christophe CURIS
f3e3ddf4f2 Removed unused WScreen argument in dock's clip function 2013-10-12 15:18:06 +01:00
Christophe CURIS
b7ae1b50e2 Removed unused WScreen argument in dock's drawer state functions
It was used to access the session state, which was stored in the
screen scruct, which is now more logically in the global namespace.
2013-10-12 15:18:06 +01:00
Christophe CURIS
6ad22c8672 Removed unused WScreen argument in Pixmap function 2013-10-12 15:18:06 +01:00
Christophe CURIS
803eb68fc4 Removed unused WScreen argument from workspace's state functions
Now that the workspace are not more attached to a screen, the
parameter is not needed anymore.
2013-10-12 15:18:05 +01:00
Christophe CURIS
fd869154c6 Removed unused WScreen argument from dock's clip state functions
Now that the workspace are not more attached to a screen, the
parameter is not needed anymore.
2013-10-12 15:18:05 +01:00
Rodolfo García Peñas (kix)
9c6e71ead0 Removed unused WScreen argument
The argument WScreen was not longer used, so can be removed.
2013-10-12 15:16:03 +01:00
Christophe CURIS
3b85fca43c configure: Added compilation check for dangerous use of 'extern' keyword 2013-10-11 21:58:32 +01:00
Christophe CURIS
18059fb1c7 wmaker: Moved definition of global variable 'wKeyBindings' to header
Multiple declaration of global variables in local source files is
a dangerous idea.
2013-10-11 21:58:14 +01:00
Christophe CURIS
d9832e578f wmaker: Moved global domain definition to the global namespace
The default domains were originally defined in different global
variables in C files; This patches groups them in a single
structure placed in global namespace.
2013-10-11 21:58:14 +01:00
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
6dcfdd072b wmaker: Moved variables for the XRandR extension 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
Rodolfo García Peñas (kix)
6d65daf1be Removed unused keymove_tick variable
The variable keymove_tick is set, but is never used after, so can
be removed.

kix@osaka:~/src/wmaker/git/wmaker-crm/src$ grep keymove_tick *[ch]
moveres.c:                      scr->keymove_tick = 0;
screen.h:    int keymove_tick;
kix@osaka:~/src/wmaker/git/wmaker-crm/src$

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-10 19:09:22 +01:00
Rodolfo García Peñas (kix)
97ecb7b613 Compiler food.
This patch set the variable aicon to NULL, to avoid compiler warnings.

This patch also adds some code style.
2013-10-09 23:57:51 +01:00
Daniel Déchelotte
f53797f9ef Remove dead code for a confirmation dialog that we'll probably never want to show
Setting a clip as autoattracting will disable an autoattracting drawer,
and reciprocally. Although not immediately obvious, it should be fairly
easy to figure out, and is totally reversible. So we'll probably never
opt to show that confirmation dialog box.
2013-10-09 13:26:09 +01:00
Daniel Déchelotte
45799efa02 Fix removal of drawer with a single appicon
When removing a drawer containing a single appicon, the latter is
docked where the drawer was, instead of being totally undocked.
2013-10-09 13:22:37 +01:00
Daniel Déchelotte
bf6bc79d37 Fix stacking level bug when creating a drawer in a keep-on-top dock
Now moving the drawer's window to the WMDockLevel if it's on top (i.e., not lowered)
(Minor bug, as it didn't persist after a WM restart)
2013-10-09 13:21:51 +01:00
Daniel Déchelotte
36cd5e6641 Correctly initialize the drawer tile when the dock is on the left side 2013-10-09 13:21:21 +01:00
Daniel Déchelotte
40231016f9 Prevent crash when toggling auto-attract on a drawer with clip disabled
toggleAutoAttractCallback needs to check whether there are clips before iterating
through them (or it crashes WM!). The extra test is needed because now drawers can
auto-attract as well. Before drawers, only clips could auto-attract, so testing
wPreferences.flags.noclip was pointless.
2013-10-09 13:21:07 +01:00
Daniel Déchelotte
4d74b18987 Allow undocking appicon when Alt is pressed
When moving an undocked appicon (or applet), allow it to
be docked even if Alt is still pressed

That conforms to pre-9fae35fbc4 behavior.
2013-10-09 13:08:44 +01:00
Rodolfo García Peñas (kix)
2e64831fb6 Removed unused variable wapp_list
The variable wapp_list is never set, then the comparison with
wapp is only true if wapp is NULL. wapp can not be NULL in the
function wApplicationDestroy() because is tested previously.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:45 +01:00
Rodolfo García Peñas (kix)
0de3e590ce shortcutWindows moved to w_global
The variable shortcutWindows is moved to w_global. Now, the shortcuts
are used in whole Window Maker, not only in the current screen.
2013-10-09 13:02:45 +01:00
Rodolfo García Peñas (kix)
6987d4aa40 Removed WScreen argument
The argument WScreen is removed in the functions
wSessionClearState() and getWindowState()

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:45 +01:00
Rodolfo García Peñas (kix)
40e1ea08b8 Varible session_state moved to global namespace
The variable session_state, defined in screen.h (WScreen), is moved to
the global variable w_global.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:45 +01:00