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

3609 Commits

Author SHA1 Message Date
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
Rodolfo García Peñas
d27ce03780 Remove warning by open coding WM_ITERATE_ARRAY macro
This patch gets rid of the warning:

switchpanel.c: In function 'wSwitchPanelSelectFirst':
switchpanel.c:673:18: warning: variable 'tmpwin' set but not used [-Wunused-but-set-variable]

by using the body of the WM_ITERATE_ARRAY directly and avoiding the temporary
variable 'tmpwin' which ends up being used only on the LHS inside the macro.
2013-10-09 13:02:45 +01:00
Rodolfo García Peñas (kix)
014bc52531 wClipIconPaint appicon argument removed
Because the wClipIconPaint() function is specific to paint the clip,
it knows where is the clip (wks_info.clip_icon), so the argument is not
needed.

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)
2103fe390b Variable clip_icon moved to clip object in the global namespace
The variable clip_icon, that contains the Clip appicon
is moved to the global clip properties.

Now the screen is not needed to know the clip_icon.
2013-10-09 13:02:45 +01:00
Rodolfo García Peñas (kix)
29ac626494 Removed unused WScreen variable in wIsADrawer
The function wIsADrawer() doesn't use the argument WScreen, so can
be removed.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
4a7daf2322 AppIcon list moved out of WScreen
The appicon list is moved out of WScreen. The reason is because
the appicon list is used to create and remove icons (appicons, dock,
clip,...) on the screen, but these icons are not associated with the
WScreen. These icons are associated with the Workspace.

If we check the WWorkspace struct we can see that the Clip is inside
this struct. The dock, the background, the workspace name are other
items related to the Workspace, not with the screen.

So, we should take out the appicon from the WScreen. But, what is the
better place to hold it? The workspace? NO!, because the icon list
is common to the all workspaces. Probably the better place is hold
as independent list in the global namespace, so this is my option.

In the next patches we can see that this is the better option, because
we can create the icons, without think where we should paint them.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
074092f319 Removed WScreen args not used
The WScreen arguments in the functions wWorkspaceMenuUpdate() and
makeMakeShortcutMenu() is not used now, so can be removed.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
e86b8dcb2f Clip, Dock and Drawers menu moved to appropriate global namespace
The clip, dock, workspaces and drawers menus are common for all
workspaces, so they should be included in the global namespace
instead of the screen struct.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
9c252988f8 Variable workspace_menu moved to workspace object in global namespace
The variable workspace_menu, that contains the workspace_menu
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_menu.

This variable is moved to the global workspace struct because it is
related to the workspace system, and not to the screen.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
f0c5073600 Array of workspaces moved to the workspace object in the global namespace
The variable workspaces, that contains the list of workspaces
is moved to the global workspace properties.

Now the screen is not needed to know the workspaces.

The function getWindowState() doesn't need the WScreen argument.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
c610b8d7ce Variable current_workspace moved to workspace object in global namespace
The variable current_workspace, that contains the current workspace
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_count.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
e5ae684d02 Variable last_workspace moved to workspace object in global namespace
The variable last_workspace, that contains the last used workspace
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_count.

The variable name is changed to workspace.last_used because a similar
variable name is also in the WApplication struct.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
9e103a46e9 Variable workspace_count moved to the workspace object in the global namespace
The variable workspace_count, that contains the number of workspaces
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_count.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
f60e65001b Moved 'workspace_name_font' from the Screen to a Workspace object in the global namespace
The new workspace struct includes the global information
for the workspaces. All information related with the workspaces
should be included here.

The first variable moved is workspace_name_font, included in this
patch. This variable was included in the screen info, but the
screen and the font used in the workspace name don't have any
relationship.
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
4ac65ab260 wmaker: code style
This patch removes some extra curly brackets, some empty lines,
extra spaces, ... to follow wmaker's coding style
2013-10-09 13:02:44 +01:00
Rodolfo García Peñas (kix)
29ccfbbf20 Avoid loop in keybinding check
This patch changes the keybinding check in cycling keyrelease.

Now, the variable binding contains the keypressed, so we can
check if the key pressed is the same than the keybinding. If
the keybinding is different (user press other key) then finish.

Without the loop, the code is faster.

Then, the keybinding variable is not used anymore, and can be removed.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2013-10-05 01:29:41 +02:00
Rodolfo García Peñas (kix)
1d09b9fdcd StartWindozeCycle uses ease variable
The function StartWindozeCycle() uses now the variable WShortKey
to store the shortcut key.

The code is the same, but now the hasModifier variable is calculated
in only one place.

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