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

201 Commits

Author SHA1 Message Date
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
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
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
a6410d61e5 wmaker: Added 'const' attribute to local variables
A number of these variable are not meant to be modified, so we
show this to the compiler.

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
69b6848187 wmaker: Added 'const' attribute to function 'wDefaultsInitDomain'
This has a few side effects which are properly handled by this patch

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-16 19:32:23 +01:00
Christophe CURIS
528955c447 Added explicit prototype for callback function and fixed code accordingly
Using an unspecified prototype function for a callback is calling
for problem. Added an explicit prototype for the 2 callback
functions in WDefaultEntry, and fixed the functions used to match
it. The new code should be a lot safer.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-09 22:20:57 +01:00
Iain Patterson
a6b1833b41 Preference to open the switchpanel without selecting a window.
If the new preference SwitchPanelOnlyOpen is set to YES, pressing
alt-tab or similar shortcut will only open the panel without
automatically switching to the next window.  Shortcuts will continue to
function normally once the panel is open.

Users can enable the new preference if they find themselves regularly
opening the switchpanel just to visualise which windows are open, or to
initiate same-class cycling.

The default value of the new preference is NO.  Behaviour is unchanged
unless the preference is explicitly enabled with the following command:

  $ wdwrite WindowMaker SwitchPanelOnlyOpen YES
2013-06-07 19:53:10 +01:00
Rodolfo García Peñas (kix)
9ededf6cb2 New header file winmenu.h
The file winmenu.h includes the function prototypes for winmenu.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
Renan Traba
3eb01800e8 added new windows positions
new window positions top left, top right, bottom left and bottom right
these new maximized positions are combinations of left, right, top and
bottom maximized positions
2013-05-21 11:24:36 +01:00
Renan Traba
d025625df0 added new maximize positions, top and bottom
these new positions are equal to left and right,
but they are at top and bottom half of screen
2013-05-21 11:24:35 +01:00
Christophe CURIS
a622197faa Added explicit 'void' to function that takes no argument
This is the correct way to tell that a function takes no
arguments, because an empty parameter list tells the compiler
that it is not yet defined, and is tolerated only for
compatibility with very old C compilers for whom prototypes
were not yet a defined language element.
2013-05-12 01:01:20 +01:00
Christophe CURIS
7f6699ffca Changed formula for getting the number of elements in a static array
When using the formula [sizeof(array) / sizeof( x )] to get the number
of element in a static array, it is better to use array[0] for 'x'
instead of the base type of array:
 - in case the base type would change someday;
 - if the compiler were deciding to insert padding somewhere
2013-05-11 00:17:27 +01:00
Iain Patterson
90675a6f04 Set StrictWindozeCycle by default.
Window Maker's behaviour changes when StrictWindozeCycle is active.  As
a rule we try not to set the default value of new options such that they
would change the behaviour expected by users.

In this case, however, the switchpanel was not working as intended.
Users who prefer the old method can set StrictWindozeCycle off with

  wdwrite WindowMaker StrictWindozeCycle NO
2013-05-02 20:41:07 +01:00
Iain Patterson
c9937f6f6a Fix StartWindozeCycle() shift key behaviour.
As the name implies, StartWindozeCycle() cycles windows in the same way
that a popular commercially-available operating system does.  However
Window Maker's handling of the shift key in the switchpanel does not
currently mirror that of its commercial counterpart.

In the popular operating system:

  Holding alt and shift then pressing and releasing tab will highlight
  the previous window in the switcher.

  Releasing shift with alt still held will not close the switcher.

  The window change is commited when alt is released.

In Window Maker:

  Holding alt and shift then pressing and releasing tab will highlight
  the previous window in the switchpanel.

  Releasing shift with alt still held will close the switchpanel and commit
  the window change.

This patch adds the StrictWindozeCycle boolean preference.  When it is
set to YES the switchpanel will remain open as long as alt is held even
if shift is pressed and released.
2013-05-02 20:41:07 +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
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
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
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
Iain Patterson
ae7235c2df Shortcuts for moving windows between workspaces.
Added new keyboard shortcuts for moving windows between workspaces.

MoveToWorkspace1Key moves the active window directly to workspace 1.
Similarly for MoveToWorkspace2Key through MoveToWorkspace10Key.

MoveToNextWorkspaceKey moves the window to the next workspace,
MoveToPrevWorkspaceKey moves the window to the previous workspace.
Both keys respect the ws_advance and ws_cycle preferences.

MoveToNextWorkspaceLayerKey moves the window ten workspaces "forward" if
possible.
MoveToPrevWorkspaceLayerKey moves the window ten workspaces "back" if
possible.
2013-03-28 19:03:33 +00:00
Iain Patterson
63219247c6 Added shortcut to switch to last used workspace.
Added new LastWorkspaceKey shortcut and Workspaces menu entry to switch back to
the last used workspace.
2013-03-28 18:57:40 +00:00
Iain Patterson
d25fde4173 Show shortcuts for workspace switching menu entries.
When showing a Workspaces menu entry for switching to a particular
workspace, also show the shortcut if one is bound for switching to that
workspace.
2013-03-28 18:53:14 +00:00
Rodolfo García Peñas (kix)
0da2b6e928 Removed old window clip balloon code
This code was used to create the window where the workspace name was showed
to the user. The code now use the standar balloon system, therefore this code
is not used anymore and can be removed.
2013-03-27 00:24:17 +00:00
Iain Patterson
2affd6d484 Make window border size configurable.
Use the new preference FrameBorderWidth to configure the width of frame
window borders.
2013-03-26 23:19:39 +00:00
Iain Patterson
dee30d06ac Make window border colours configurable.
Use the new preferences FrameBorderColor and FrameSelectedBorderColor to
set the border colour of frame windows and selected frame windows
respectively.
2013-03-26 23:19:39 +00:00
Rodolfo García Peñas (kix)
b9caaa8729 WINGs: New function W_setconf_doubleClickDelay
The new function W_setconf_doubleClickDelay() sets the value for
WPreferences.W_setconf_doubleClickDelay(), therefore the private
data of WPreferences struct is not used.

This call is used at defaults.c to set the doubleClickDelay().
2013-01-12 14:45:29 +00:00
Carlos R. Mafra
3b8c36510f Set mod+wheel to OFF by default
Resizing windows with the mouse wheel was introduced in a063338175
("Mod+Wheel Window Resize") and it should be disabled by default
in order to not confuse users.

Users wanting this behavior can enable it through WPrefs.

Bug report: https://bugs.launchpad.net/ubuntu/+source/wmaker/+bug/1082879
2013-01-06 23:27:44 +00:00
Rodolfo García Peñas (kix)
0a461416e3 Avoid icon change to default on winspector save
For a icon, the icon image is stored in icon->file_image. If we repaint
the image, we we don't need search the icon again. We can continue using
icon->file_image.

Indeed, if launch the "window inspector" window (winspector), using a
saved icon and "ignore client icon" set, then the database holds the
name of the icon to draw on the screen. If we remove the icon info in
the winspector (removing the file name or un-setting the "ignore client
icon" flag, then the database losts the icon name and then the function
wDefaultUpdateIcons() cannot find the icon to draw for the icon.

In winspector, with this patch, the previous image set by "ApplySettings"
and stored at icon->file_image is used.
2012-11-29 09:37:42 +00:00
Rodolfo García Peñas (kix)
99e5a7a9eb winspector.c: Full clean patch
This patch sets a correct style on winspector.c. It removes some
empty lines, moves variable definitions to the function heads,
moves preprocessor definitions to the top of the file and removes
some extra curly brackets.

The function to create the winspector panel is so big, and is hard
to understand it. This patch split the function createInspectorForWindow
in some extra functions:

create_tab_window_attributes
create_tab_window_advanced
create_tab_icon_workspace
create_tab_app_specific

This functions don't do nothing extra, only the code is moved to them.
2012-11-29 09:27:30 +00:00
Martin Frydl
914d4e06ef Added option to ignore minimized windows during cycling.
Added CycleIgnoreMinimized configuration option settable on Expert page in WPrefs.
When option is set, switch panel cycling ignores minimized (grayed) windows. They
are still visible and can be selected using left/right arrows or mouse click.
2012-11-28 00:07:13 +01:00
BALATON Zoltan
c7e3666e62 Made highlighting the AppIcon of the active app configurable at run time 2012-11-17 20:32:10 +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)
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)
ff9f942c47 Better default icon management
This patch replaces the Pixmap icons from screen.h with only one
RImage. This image is not processed yet, therefore could be used
for icons with title or without it (replacing def_ticon_pixmap and
def_icon_pixmap variables).

Now the code is better because the Pixmap is generated and saved in
the icon structure.

See that before this patch, the icon->pixmap was set to None!!
With this patch, the icon->pixmap is saved, using the common
method used in the other functions to create Pixmaps, the function
icon_update_pixmap().
2012-10-28 10:58:43 +00:00
Rodolfo García Peñas (kix)
bef6555b6a noDefault changed to default_icon
The functions wDefaultGetIconFile(), get_default_icon_filename() and
get_generic_value() use the argument noDefault in order to avoid searching the
default icon. This double negation is difficult to read though. This patch
changes it to be True if the default icon should be included or false if not.

This patch changes the noDefault argument to default_icon, then the
True is now False and False is True.

The main change is at get_generic_value():

-       /* Search the default icon name - See noDefault argument! */
-       if (!value && !noDefault) {
+       /* Search the default icon name - See default_icon argument! */
+       if (!value && default_icon) {

Because the functions wDefaultGetIconFile() and get_default_icon_filename()
mainly forwards the noDefault argument to get_generic_value().
2012-07-18 11:12:01 +01:00
Rodolfo García Peñas (kix)
d6db53af0b Remove unused argument from wDefaultGetIconFile()
The function wDefaultGetIconFile() doesn't use the argument WScreen,
so it can be removed.
2012-07-04 20:44:40 +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
Yuri Karaban
9d3d34599f Add "Center" window placement strategy
Center strategy: try to put window at the center of the usable area. If
window would overlap with existing windows, fall back to "Auto"
placement strategy.

It's very useful for fresh workplaces.
2012-06-10 18:25:47 +01:00
Rodolfo García Peñas (kix)
1a594de74e Remove code duplication by calling readGlobalDomain()
The code in defaults.c to get the shared database is
included in the same file (function readGlobalDomain).
2012-06-10 12:27:27 +01:00
Rodolfo García Peñas (kix)
21a5f41c08 New function create_logo_image
New function create_logo_image to set the logo image.
2012-06-02 20:58:58 +01:00
Tobias Stoeckmann
cc30444dda No need to call memset after wmalloc
memset is the last function call in wmalloc, just before it returns the
newly allocated memory.  Therefore it is not needed to call it again
after wmalloc call.  Although I would prefer to switch wmalloc to a
calloc-based wcalloc function, the compatibility of WINGs for old apps
should be kept.
2012-05-04 18:41:01 -03:00
Carlos R. Mafra
8311058a16 Revert "Inotify: Reload keyboard shortcut definitions when configuration changes"
This reverts commit cbe2f4e61a.

The reason for the revert is the regression reported here:
http://marc.info/?l=openbsd-ports&m=133151145814675&w=2

  I've been able to reliably reproduce the double-spawning of
  xterms I've been seeing. The bad news is that it still happens
  even with a fresh configuration directory.

  To reproduce:
  0) Create a keyboard shortcut if one does not already exist (I'm
  using <ctrl>+u set to spawn an xterm)
  1) Open WindowMaker's preferences.
  2) Click on "Applications Menu Definition" (it's the icon
  immediately to the left of the keyboard icon)
  3) Click save, and then close.
  4) Keyboard shortcuts will spawn two applications.

  I use keyboard shortcuts to spawn xterms, browsers, and filemanagers.
  All of them spawn twice after performing the above.  To fix it,
  <F12> or <right-click> -> Exit -> Restart.

  If I repeat steps 1-3, three windows will spawn.  Repeat again and
  four windows will spawn etc.  (I stopped after getting five to
  spawn at once).
2012-04-30 14:36:43 -03: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
Rodolfo García Peñas (kix)
517cd6a8be Remove unused functions
These functions are not used:

- wDefaultsDestroyDomain
- PropWriteGNUstepWMAttr
- wSessionSendSaveYourSelf
- wXDNDClearAwareness
- clearWaitingAckState
- wSessionSaveClients
2012-04-04 19:44:40 +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
Alexey I. Froloff
e819818eeb Options for limiting window/menu title height
(Window|Menu)Title(Min|Max)Height defaults options allow to set
minimum and maximum titlebar height.

For example, to force all titlebars to 24 pixels execute
following commands:

$ wdwrite WindowMaker WindowTitleMinHeight 24
$ wdwrite WindowMaker WindowTitleMaxHeight 24
$ wdwrite WindowMaker MenuTitleMinHeight 24
$ wdwrite WindowMaker MenuTitleMaxHeight 24

Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2012-02-27 14:19:49 +00:00