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.
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.
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>
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>
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>
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>
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.
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.
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.
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.
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.
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>
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 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 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]
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
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.
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
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
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.
If btn->omnipresent, then btn->dock is precisely
scr->workspaces[scr->current_workspace]->clip (cf.
wWorkspaceForceChange() calling wClipUpdateForWorkspaceChange())
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.
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.
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.
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.
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.
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.