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

171 Commits

Author SHA1 Message Date
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)
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)
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)
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
Christophe CURIS
ec91b9f68e wmaker: Moved definition of X Contexts 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
Rodolfo García Peñas (kix)
709e7654bc Small typo with the word attempts
This patch changes the word attemps to attempts in src/dock.c
2013-09-28 17:24:51 +01:00
Christophe CURIS
60a4121a92 wmaker: Moved function prototype to the appropriate header
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:13:41 +01:00
Christophe CURIS
91529ff1a7 wmaker: Replaced local declaration of system function by proper header call
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-30 15:10:09 +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
c9b816de75 wmaker: Added 'const' attribute to remaining functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
f0c1dc9fc3 wmaker: Added 'const' attribute to most local functions
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
ebac6e7c83 Fixed incorrect format specifier
As reported by clang, the format used was %hi which is expecting
a short-typed argument, but the parameters are actually defined
as ints in the structure, so use only %i.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-11 08:22:47 +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)
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)
41da1b30db New file misc.h
This is the new file misc.h, with the function prototypes for misc.c.
This file is created using misc.c and removing the prototypes from funcs.h
2013-04-17 10:13:25 +01:00
Carlos R. Mafra
311255a646 Fix compilation from merge conflict 2013-04-12 02:20:54 +01:00
Carlos R. Mafra
529ee0bd21 Merge branch 'wmdrawer' into next 2013-04-12 02:14:41 +01:00
Daniel Déchelotte
878a57d7b2 Add option to merge the workspace-switching functionality into the dock
The dock will have the up-right and down-left arrows to change workspaces and
the clip will be disabled. That is, if option ClipMergedInDock is set to yes in
GNUstep/Defaults/WindowMaker.
[not thoroughly tested]
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
36bed6a77e Wrap appicons when dock is moved up and down
Add WrapAppiconsInDock option to control that behaviour (default: YES)
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
3c628d50d2 Allow appicons above the dock
Previous, even the "anchor tile" of the dock could be moved down, it was
not possible to dock anything above it.
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
5e004d5f11 Real-time dock left-right swapping
No more ghost dock when switching sides: the real swap happens
immediately, you can still adjust vertically afterwards. Removed two
functions in superfluous that are no longer used
2013-04-12 02:14:10 +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
Daniel Déchelotte
9fae35fbc4 Merging appicon.c:appIconMouseDown and dock.c:handleIconMove into appicon.c:wHandleAppIconMove
Behaves essentially the same, only a bit more consistently.
Known differences:
1. An AppIcon will now always end up undocked if moved while Mod1 is pressed.
2. Moving a docked AppIcon with Mod1 pressed (undocking it) used to auto-expand the clip,
   as clip expansion happened first, while looking for a snapping position,
   and the test on Mod1 being pressed happened only later
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
8b6ff01d39 Move code that removes icons from a dock to new removeIcons function
Code taken from removeIconsCallback.
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
f93f847b33 Bring back some "About" information when double-clicking the dock
When dock is double-clicked and no application is defined to be launched, show
the information panel (instead of doing nothing).
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
d24cbc79ee Make the clip's auto-delays configurable
The options are ClipAutoraiseDelay, ClipAutolowerDelay, ClipAutoexpandDelay, ClipAutocollapseDelay

The default values are weird but merely represent the previously
hard-coded ones. They are repeated in Defaults/WindowMaker to avoid a
WPrefs crash (but it's a good idea to make them "visible", too)

WPrefs change coming up
2013-04-12 02:14:10 +01:00
Daniel Déchelotte
6f44be87fc Consolidated all code checking whether a tile is fully on screen in one static function
The function existed before, but had all kinds of unneeded arguments and wasn't called everywhere.
2013-04-12 02:14:09 +01:00
Daniel Déchelotte
be95172c95 Avoid clip flickering when docking an appicon
In handleIconMove, when moving an appicon near the clip, all clips were
systematically shown each time the mouse moved, causing some flickering
(perhaps only perceptible on a low-end machine?). This patch introduces
a showed_all_clips boolean to expand clips only once.
2013-04-12 02:14:09 +01:00
Daniel Déchelotte
dfe7e255b2 Deleted useless test
If btn->omnipresent, then btn->dock is precisely
scr->workspaces[scr->current_workspace]->clip (cf.
wWorkspaceForceChange() calling wClipUpdateForWorkspaceChange())
2013-04-12 02:14:09 +01:00
Rodolfo García Peñas (kix)
dee9c457cf Remove wIconUpdate in wDockAttachIcon
The call to wIconUpdate() can be changed by call to update_icon_pixmap(),
because the icon doesn't need to be changed. This update is only for change
the icon pixmap to un-shadowed.

Now, the icon pixmap is updated faster.
2013-04-08 22:06:27 +01:00
Rodolfo García Peñas (kix)
3d0ed99043 Remove wIconUpdate in wDockDetach
The call to wIconUpdate() can be changed by call to update_icon_pixmap(),
because the icon doesn't need to be changed. This update is only for change
the icon pixmap to un-shadowed.

Now, the icon pixmap is updated faster.
2013-04-08 22:06:27 +01:00
Rodolfo García Peñas (kix)
88d16d03b9 Remove wIconUpdate in moveIconBetweenDocks
The call to wIconUpdate() can be changed by call to update_icon_pixmap(),
because the icon doesn't need to be changed. This update is only for change
the icon pixmap to shadowed.

Now, the icon pixmap is updated faster.
2013-04-08 22:06:27 +01:00
Rodolfo García Peñas (kix)
256c8a498e Remove wIconUpdate in keepIconsCallback
The call to wIconUpdate() can be changed by call to update_icon_pixmap(),
because the icon doesn't need to be changed. This update is only for change
the icon pixmap to shadowed.

Now, the icon pixmap is updated faster.
2013-04-08 22:06:26 +01:00
Rodolfo García Peñas (kix)
4093d24625 wIconUpdate removed image argument
The argument image is not used in any call, so can be removed.
2013-04-08 22:06:26 +01:00
Rodolfo García Peñas (kix)
389a0a252c New file placement.h
The file placement.h hold the definitions for placement.c
2013-04-03 19:33:34 +01:00
Rodolfo García Peñas (kix)
bf2f942138 Avoid crash on icon move without command
This patch avoid a crash when moving an icon without command.
To reproduce the problem:

1. Launch an application, for example xeyes, with appicon.
2. Move the appicon to the clip.
3. Close the application.
4. Edit the appicon in the clip, and empty the commands fields.
5. Move the appicon from the clip to the dock. -> Crash.

The crash happends because icon->icon->owner is NULL and then
wwin will be NULL. Then the call of wwin->client_win will crash.

This patch checks if icon->icon->owner is not null (application is
running) and then assign it to wwin. Then get the command from the
running application.
2012-11-28 00:12:59 +01:00
Rodolfo García Peñas (kix)
522d84b0ef wIconUpdate image preselected
The function wIconUpdate can receive a image to setup as icon image.
If image is NULL, then use the original method, using different procedures
to get the image.
2012-11-17 20:38:36 +01:00
Rodolfo García Peñas (kix)
cc1503a2f0 wAppIconPaint argument removed
This patch removes the wAppIconPaint() Bool flag, because now it is
always False.
2012-11-11 11:59:41 +00:00
Rodolfo García Peñas (kix)
a950d0e247 Update icon images before calling wIconUpdate
This patch updates the icon images if needed before calling wIconUpdate.
2012-11-11 11:59:19 +00:00
Rodolfo García Peñas (kix)
33ebded4f9 wAppIconPaint paint argument
The function wAppIconPaint has a new argument. This argument is used
to force an icon create if needed.
2012-11-11 11:57:58 +00:00
Rodolfo García Peñas (kix)
a3078a5095 wDockAttachIcon paint argument
The function wDockAttachIcon has a new argument. This argument is used
to force an icon create if needed.
2012-11-11 11:57:58 +00:00
Rodolfo García Peñas (kix)
6bc48464e9 wDockAttachIcon icon_editing is common in if else
The line "icon_editing = 0" is the first line in the "if" sentence
and the first (and only) sentence in the "else" block, so can be
moved outside the if-else (and the empty else block can be removed).
2012-11-10 19:41:34 +00:00
Rodolfo García Peñas (kix)
e988386013 Removed block in restore_icon_state
The block inside restore_icon_state is not needed, so can be removed.

There are no changes with or without the block (variables scope,...).
2012-10-06 15:29:58 +01:00
Rodolfo García Peñas (kix)
a089647d27 Coding style cleanup in dock.c
This patch reviews the code style in dock.c, removing some
curly brackets not needed and adding other where needed.

This patch removes some lines commented and some extra lines for
better understanding.
2012-10-06 15:25:10 +01:00
Rodolfo García Peñas (kix)
f5d845cfad Remove unused argument from wDefaultFillAttributes()
The function wDefaultFillAttributes() doesn't use the argument WScreen,
so it can be removed.
2012-07-04 20:45:56 +02:00
Rodolfo García Peñas (kix)
42cb1291e3 New move_window function 2012-06-25 23:43:39 +01: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
Carlos R. Mafra
b6ced4fa5d Address unprototyped call in dock.c
Create a header file dockedapp.h to address a long-standing warning
which pollutes the compilation output with --enable-silent-rules:

Making all in src
  CC     dock.o
dock.c: In function ‘wDockDetach’:
dock.c:2118:3: warning: call to function ‘DestroyDockAppSettingsPanel’ without a real prototype [-Wunprototyped-calls]
dock.c:65:13: note: ‘DestroyDockAppSettingsPanel’ was declared here
  CCLD   wmaker
2012-06-23 12:09:41 +01:00