wmaker-crm.git
14 years agoKeyboard shortcut to raise the dock
Brad Jorsch [Wed, 6 Jan 2010 17:50:36 +0000 (6 12:50 -0500)]
Keyboard shortcut to raise the dock

This patch adds the DockRaiseLowerKey shortcut, which raises/lowers
the dock depending on whether the dock is lowered/raised.

[crmafra: Reformatted Brad's patch against git repo and removed the
 DockRaiseKey and DockLowerKey shortcuts ]

14 years agoUndefine WINDOW_BIRTH_ZOOM
Carlos R. Mafra [Wed, 6 Jan 2010 09:31:08 +0000 (6 10:31 +0100)]
Undefine WINDOW_BIRTH_ZOOM

I don't want the (small) overhead of the window birth zoom special effects
because I like apps popping up instantly when I open them (specially now
with the SSD).

Another way to not get the birth animation is to unset "animations" in
WPrefs, but that makes the other animations which I care (ie they don't have
the effect of making my computer seem slower than it really is) go away.

14 years agoDo not compile extra stuff under wrlib/tests etc
Carlos R. Mafra [Tue, 5 Jan 2010 17:36:43 +0000 (5 18:36 +0100)]
Do not compile extra stuff under wrlib/tests etc

Let's avoid compiling these "tests" and extra stuff every time,
saving us some time.

14 years agoDo not change workspace during deiconify animation
Carlos R. Mafra [Sat, 26 Dec 2009 20:09:10 +0000 (26 21:09 +0100)]
Do not change workspace during deiconify animation

Paul Harris reported that using the mouse wheel over a miniwindow
would deiconify it to a different workspace than the original one
where it was iconified.

This happens because after the window begins to be deiconified the
"residual" mouse wheel scrolling hits the workspace background, and
Window Maker changes workspace with wWorkspaceRelativeChange().

But if it all happens fast enough (so the deiconification animation
did not finish yet) the workspace will have changed before the
window reaches its final deiconified destination, leading to
the situation that Paul described in the link below.

So to avoid this, let's set a 'ignore_wks_change' variable
from wDeiconifyWindow() and make wWorkspaceRelativeChange() respect it.

Original report: http://lists.windowmaker.info/dev/msg00821.html

14 years agoRemove unused function raiseMenus()
Carlos R. Mafra [Mon, 21 Dec 2009 22:00:33 +0000 (21 23:00 +0100)]
Remove unused function raiseMenus()

GCC warns:

rootmenu.c:350: warning: 'raiseMenus' defined but not used

14 years agoRemove XSMP_ENABLED constructs
Carlos R. Mafra [Mon, 21 Dec 2009 21:34:33 +0000 (21 22:34 +0100)]
Remove XSMP_ENABLED constructs

The code was never used and the !XSMP_ENABLED code seems to
work well enough for all these years.

14 years agofixed problem with default visual ID for multi-screen setups by using multiple IDs...
Ralf Hoffmann [Thu, 10 Dec 2009 18:57:23 +0000 (10 19:57 +0100)]
fixed problem with default visual ID for multi-screen setups by using multiple IDs for each screen

Since a single default visual ID cannot be used for multiple screens, thus
Window Maker refused to start. There is now a global function for getting the
default visual ID. The command line argument --visual-id can be a comma
separated list of visual IDs for each screen. A default value is only set for
the first screen.

14 years agoAdd menu path to Debian build system
Nicolas Bonifas [Thu, 10 Dec 2009 00:26:13 +0000 (10 01:26 +0100)]
Add menu path to Debian build system

Part of the menu on Debian systems is stored in
/etc/X11/Windowmaker/menu.hook. This patch will add this path to
src/wconfig.h.in when building the Debian wmaker package. This is
what is done in the Debian version of wmaker 0.92.0.

14 years agoRemove unused arguments from a few functions
Carlos R. Mafra [Wed, 9 Dec 2009 20:04:29 +0000 (9 21:04 +0100)]
Remove unused arguments from a few functions

gcc 4.4.1 was warning (among others):

switchpanel.c: In Funktion »getTile«:
switchpanel.c:321: Warnung: unbenutzter Parameter »panel«
switchpanel.c: In Funktion »makeWindowListArray«:
switchpanel.c:377: Warnung: unbenutzter Parameter »scr«
switchpanel.c:377: Warnung: unbenutzter Parameter »workspace«

14 years agoRemove static function declaration from header file
Carlos R. Mafra [Wed, 9 Dec 2009 19:39:21 +0000 (9 20:39 +0100)]
Remove static function declaration from header file

14 years agoRemove unused function argument from randomPlaceWindow()
Carlos R. Mafra [Wed, 9 Dec 2009 19:35:13 +0000 (9 20:35 +0100)]
Remove unused function argument from randomPlaceWindow()

14 years agoMaximus: Take border into account
Nicolas Bonifas [Mon, 7 Dec 2009 23:37:02 +0000 (8 00:37 +0100)]
Maximus: Take border into account

This patch fixes a minor bug in Maximus: the new window size didn't take the
 border into account. This bug was particularly visible with the
 "do not cover dock" option turned on.

14 years agochanged behavior when focusing new windows with autofocus enabled
Ralf Hoffmann [Fri, 4 Dec 2009 14:01:14 +0000 (4 15:01 +0100)]
changed behavior when focusing new windows with autofocus enabled

New windows will only get focused if the mouse is on the same screen.
The code doesn't handle multiple heads but since it's just one screen
the function works as usual. Checking the head and assign the focus only
if the window is on the same head might be a good idea. Making the whole
stuff optional might be even better.

14 years agofixed wrong env setup when setting background
Ralf Hoffmann [Fri, 4 Dec 2009 13:57:01 +0000 (4 14:57 +0100)]
fixed wrong env setup when setting background

This patch fixes a problem with restarting Window Maker in multi-screen
environments. The code for setting the background by calling wmsetbg
changes the environment. In multi-screen setups the DISPLAY variable
becomes :0.0 instead of :0 (for example). The restarted Window Maker
process therefore only manages one screen.

14 years agoactivate XGrabServer again
Ralf Hoffmann [Fri, 4 Dec 2009 13:51:31 +0000 (4 14:51 +0100)]
activate XGrabServer again

This patch fixes a small problem which only rarely occurs. If a
window is opened only for a very short time and closed right away, in
some circumstances the frame around it stays opened. It looks like
Window Maker doesn't get the destroy message. The XGrabServer call was
commented in the code so I activated it again which seems to prevent this
from happening. I think it actually make sense since the ungrab calls are
used anyway in the following code.

14 years agoRemove DRAWSTRING_PLUGIN reference from wconfig.h.in
Carlos R. Mafra [Sun, 6 Dec 2009 14:53:09 +0000 (6 15:53 +0100)]
Remove DRAWSTRING_PLUGIN reference from wconfig.h.in

DRAWSTRING_PLUGIN never appears anywhere else in the sources.

14 years agoRemove unused function getRImages()
Carlos R. Mafra [Sun, 6 Dec 2009 13:49:00 +0000 (6 14:49 +0100)]
Remove unused function getRImages()

Pointed out by Nicolas Bonifas.

14 years agoRemove unused src/menureader.c file
Carlos R. Mafra [Sun, 6 Dec 2009 13:39:29 +0000 (6 14:39 +0100)]
Remove unused src/menureader.c file

14 years agoRemove unused wHackedUngrabButton()
Carlos R. Mafra [Sun, 6 Dec 2009 13:22:05 +0000 (6 14:22 +0100)]
Remove unused wHackedUngrabButton()

Pointed out by Nicolas Bonifas.

14 years agoRemove unused function wIconSetHighlited()
Carlos R. Mafra [Sun, 6 Dec 2009 13:15:42 +0000 (6 14:15 +0100)]
Remove unused function wIconSetHighlited()

There is no point in carrying unused functions for so long.

Pointed out by Nicolas Bonifas.

14 years agoRemove unused functions from src/pixmap.c
Carlos R. Mafra [Sun, 6 Dec 2009 13:12:11 +0000 (6 14:12 +0100)]
Remove unused functions from src/pixmap.c

In case someone needs them in the future for some reason,
they can be restored from the git logs.

Pointed out by Nicolas Bonifas.

14 years agoRemove unused function wWindowCheckAttributeSanity()
Carlos R. Mafra [Sun, 6 Dec 2009 13:04:43 +0000 (6 14:04 +0100)]
Remove unused function wWindowCheckAttributeSanity()

As pointed out by Nicolas Bonifas, wWindowCheckAttributeSanity() is
currently unused. Removing it saves 200 bytes:

  text    data     bss     dec     hex filename
  23476       0       8   23484    5bbc src/window.o.new
  23676       0       8   23684    5c84 src/window.o.old

14 years agoRemove useless NULL test
Nicolas Bonifas [Sun, 6 Dec 2009 01:19:20 +0000 (6 02:19 +0100)]
Remove useless NULL test

If menu is NULL we would have a null pointer dereference when initializing scr.

> Ie, why not move the assignment of 'src' to after the test?

I thought about this, but I checked the 3 different calls to
updateWorkspaceMenu (all in winmenu.c). They must all call
updateWorkspaceMenu with non-NULL pointers, so if we have a NULL
'menu' pointer then we obviously have a major problem and it is
probably better to crash here than to silently return and fail a
little latter.

[crmafra: edit changelog]

14 years ago2 open() statements were not matched with close() statements in function fetchFile
Nicolas Bonifas [Sun, 6 Dec 2009 02:02:26 +0000 (6 03:02 +0100)]
2 open() statements were not matched with close() statements in function fetchFile

14 years agoUpdate German translation
Carlos R. Mafra [Tue, 1 Dec 2009 13:17:50 +0000 (1 14:17 +0100)]
Update German translation

Based on a patch from OpenSUSE whose author is unknown.

14 years agoFix the empty button in titlebar after going fullscreen bug (Debian bug #298873)
Nicolas Bonifas [Tue, 17 Nov 2009 00:01:54 +0000 (17 01:01 +0100)]
Fix the empty button in titlebar after going fullscreen bug (Debian bug #298873)

14 years agoRemove DEMATERIALIZE_ICON code
Carlos R. Mafra [Fri, 16 Oct 2009 23:56:28 +0000 (17 01:56 +0200)]
Remove DEMATERIALIZE_ICON code

This animation is not as cool as the NORMAL_ICON_KABOON, so I don't
think having a choice here is justified. Let's remove this option
(it was not defined in wconfig.h.in by default) and keep using
the nicer NORMAL_ICON_KABOON.

14 years agoRemove SILLYNESS
Carlos R. Mafra [Fri, 16 Oct 2009 23:26:28 +0000 (17 01:26 +0200)]
Remove SILLYNESS

This code makes wmaker a little bit bigger for no gain at all. I could
undefine SILLYNESS and forget it, but I actually also want a clean
source code to read. And the less code the better.

So now I won't get a different Info dialog on Christmas, but
my wmaker will also not carry around that code in the other 364 days
of the year.

As a result, wmaker gets ~1.7 % smaller

   text    data     bss     dec     hex filename
 448043   17424    8200  473667   73a43 wmaker.new
 455340   18360    8328  482028   75aec wmaker.old

14 years agoRemove #ifdef SYS_SIGLIST_DECLARED constructs
Carlos R. Mafra [Fri, 16 Oct 2009 23:05:28 +0000 (17 01:05 +0200)]
Remove #ifdef SYS_SIGLIST_DECLARED constructs

SYS_SIGLIST_DECLARED was defined nowhere and it was
clearly some dead code.

14 years agoMod+Wheel resize increment now respects size hints
Johann Haarhoff [Mon, 12 Oct 2009 19:48:45 +0000 (12 21:48 +0200)]
Mod+Wheel resize increment now respects size hints

Thanks to Iains patch which showed me how to access the window hints, I
now propose the following: The resize increment is set to the closest
multiple of the size hints larger than wPreferences.resize_increment.

This should fix Carlos' complaint about fixed-increment windows resizing
too "slowly", and it also fixes my complaint about the blank space below
the last line of an xterm.

Thanks to:
    Iain Patterson <wm@iain.cx>

14 years agoRespect size hints when resizing with wheel.
Iain Patterson [Mon, 12 Oct 2009 09:24:55 +0000 (12 10:24 +0100)]
Respect size hints when resizing with wheel.

Use height and width increment when wheel resizing if size hints are
set on a window and meaningful height and width increments are
specified.
Windows which don't care about their resize increments will have height
and width increments set to 1.  For these windows - and windows without
resize hints at all - use the setting configured with ResizeIncrement.

14 years agoRemove remaining sound stuff from WPrefs etc
Carlos R. Mafra [Mon, 12 Oct 2009 01:01:46 +0000 (12 03:01 +0200)]
Remove remaining sound stuff from WPrefs etc

Let's remove the configuration options about "sound" from
WPrefs (as it was never fully functionall anyway) and from
configuration files.

Remove also the xpm and tiff icons.

14 years agoWPrefs: trivial coding style fixes
Carlos R. Mafra [Mon, 12 Oct 2009 00:41:27 +0000 (12 02:41 +0200)]
WPrefs: trivial coding style fixes

14 years agoRemove repeated functions enclosed by #if 0
Carlos R. Mafra [Sun, 11 Oct 2009 22:31:51 +0000 (12 00:31 +0200)]
Remove repeated functions enclosed by #if 0

There are already working versions of these functions,
so let's remove these copies.

14 years agoRemove #ifdef NETWM_HINTS constructs
Carlos R. Mafra [Sun, 11 Oct 2009 22:08:21 +0000 (12 00:08 +0200)]
Remove #ifdef NETWM_HINTS constructs

NETWM_HINT is always defined in src/wconfig.h.in, so
let's remove it from there too.

14 years agoA few trivial code style cleanups
Carlos R. Mafra [Sun, 11 Oct 2009 21:30:41 +0000 (11 23:30 +0200)]
A few trivial code style cleanups

14 years agoMod+Wheel Window Resize
Johann Haarhoff [Sun, 11 Oct 2009 19:36:46 +0000 (11 21:36 +0200)]
Mod+Wheel Window Resize

This patch adds the ability to resize windows with the mouse wheel
while holding the Mod key. This currently ignores wWindowConstrainSize
until I can figure out a way to repeatably resize windows with
fixed size increments (like xterm) using this method.

This also adds a slider to WPrefs to choose the increment with which
the wheel will resize a window.

14 years agoHOWTO: The perfect Window Maker patch
Carlos R. Mafra [Sun, 11 Oct 2009 15:14:53 +0000 (11 17:14 +0200)]
HOWTO: The perfect Window Maker patch

This document is a very brief description about how you can
create a patch "the git way", so that it can be applied
easily with 'git am'.

14 years agoIncrease granularity of 'shrink/zoom' animation
Carlos R. Mafra [Sat, 10 Oct 2009 17:55:57 +0000 (10 19:55 +0200)]
Increase granularity of 'shrink/zoom' animation

Now it is a bit easier to actually enjoy the animation :-)

14 years agoRemove MINIATURIZE_ANIMATION_DELAY_{Z,F,T} tests
Carlos R. Mafra [Sat, 10 Oct 2009 17:22:31 +0000 (10 19:22 +0200)]
Remove MINIATURIZE_ANIMATION_DELAY_{Z,F,T} tests

We know that they are non-zero because we set their
values explicitly in wconfig.h.in, so there is no
point in checking them.

14 years agoAdd function prototypes in action.h and include it in superfluous.c
Carlos R. Mafra [Sat, 10 Oct 2009 17:13:02 +0000 (10 19:13 +0200)]
Add function prototypes in action.h and include it in superfluous.c

14 years agoRemove 'hiding' parameter from animateResize()
Carlos R. Mafra [Sat, 10 Oct 2009 16:47:32 +0000 (10 18:47 +0200)]
Remove 'hiding' parameter from animateResize()

It was a bit pointless.

14 years agoDelete WINDOW_BIRTH_ZOOM and default to WINDOW_BIRTH_ZOOM2
Carlos R. Mafra [Sat, 10 Oct 2009 16:27:52 +0000 (10 18:27 +0200)]
Delete WINDOW_BIRTH_ZOOM and default to WINDOW_BIRTH_ZOOM2

WINDOW_BIRTH_ZOOM was a bit lame and it makes sense to not have
it at all. So remove the trailing "2" of WINDOW_BIRTH_ZOOM2 and
make it the only choice (you can #define it in src/wconfig.h.in).

Note that it uses the same algorithm as the animation to resize,
ie zoom, twist or flip. You can choose them in WPrefs.

14 years agoRemove 'ghost window move' code
Carlos R. Mafra [Fri, 9 Oct 2009 22:05:58 +0000 (10 00:05 +0200)]
Remove 'ghost window move' code

GHOST_WINDOW_MOVE was not defined anywhere. Let's remove that
code.

14 years agoRemove SPEAKER_SOUND dead code
Carlos R. Mafra [Fri, 9 Oct 2009 21:47:22 +0000 (9 23:47 +0200)]
Remove SPEAKER_SOUND dead code

SPEAKER_SOUND is defined nowhere, so this code was not being used
and I don't want its functionality anyway.

14 years agoRemove sound support
Carlos R. Mafra [Fri, 9 Oct 2009 17:57:25 +0000 (9 19:57 +0200)]
Remove sound support

Two reasons for removing it:

    1) I won't ever want to hear useless sounds

    2) The sound support is a bit of a joke. The code is there but you have
       to hunt it somewhere else (not in any repository that I know of).
       In my 10 years of using wmaker, I never used it for this reason.
       Now I consider having no sound in Window Maker a feature, and I like
       it that way. So there is no point in carrying useless code around.

PS: There is still the code in WPrefs to be removed.

14 years agoClean up contrib/ folder
Carlos R. Mafra [Thu, 24 Sep 2009 21:53:03 +0000 (24 23:53 +0200)]
Clean up contrib/ folder

Let's remove the "single click" patch from there.

14 years agoUpdated documentation
John H. Robinson, IV [Thu, 24 Sep 2009 21:10:57 +0000 (24 14:10 -0700)]
Updated documentation

Updated URIs
Removed stale/outdated information
Reformatted for 80 columns

14 years agoFix msgfmt error with Armenian translation.
Iain Patterson [Tue, 22 Sep 2009 09:26:39 +0000 (22 10:26 +0100)]
Fix msgfmt error with Armenian translation.

msgfmt said:

hy.po:685: `msgid' and `msgstr' entries do not both end with '\n'

Fixed by adding newline as in original text.

14 years agoWindow Maker armenian translation
Norayr Chilignaryan [Mon, 21 Sep 2009 07:28:24 +0000 (21 12:28 +0500)]
Window Maker armenian translation

14 years agoAnsify function declarations
Carlos R. Mafra [Sun, 20 Sep 2009 00:53:57 +0000 (20 02:53 +0200)]
Ansify function declarations

I've just noticed them en passant.

14 years agoFix automatic Debian builds
Martin Dietze [Wed, 23 Sep 2009 21:12:18 +0000 (23 23:12 +0200)]
Fix automatic Debian builds

14 years agoswpanel: Fix focus issue when alt-tabbing
Carlos R. Mafra [Sat, 19 Sep 2009 12:16:05 +0000 (19 14:16 +0200)]
swpanel: Fix focus issue when alt-tabbing

The problem was the following. While alt-tabbing from one
window to a xterm, wait for the xterm to be raised but
keep the alt key pressed. Now move the mouse cursor
over the xterm and release the alt key.

The result is a xterm in a zoombie focused state; its titlebar
has the focused color but xterm itself is not focused and does
not accept any input.

Fix this by reinstating the check for a NULL pointer from
wSwitchPanelHandleEvent() before changing focus. That function
detects if the mouse cursor moved over to the same window which
is currently being pointed out by the switchpanel, and returns
NULL in this case (the check for panel->current != focus fails).

Thanks to Paul Harris for reporting it!

14 years agoMaximus: Some cleanups and bug fixes
Carlos R. Mafra [Thu, 17 Sep 2009 19:51:52 +0000 (17 21:51 +0200)]
Maximus: Some cleanups and bug fixes

Let's ignore hidden windows and also adjust the coordinates
a bit, to avoid ~2 pixels of overlap.

I thank Paul Harris for pointing out these bugs.

14 years agoMaximus: Avoid a window list order issue
Carlos R. Mafra [Wed, 16 Sep 2009 22:18:56 +0000 (17 00:18 +0200)]
Maximus: Avoid a window list order issue

If we compute the maximus geometry in only one pass through
the window list, the order in which the windows appear in
the list can affect the outcome.

That is because before computing the intersections in the
y-projections we update the y coordinates from whatever window
which happened to change the new_y coordinate during the
previous x-intersection computations, but that may not be _the_
blocking window which decides the final positions in the y axis.
Therefore we may find that this "intermediate window state"
has a non-vanishing y-intersection with another one -- and
be blocked by it -- even though that should not be the case for
the final outcome.

So to avoid that we first scan through all the windows to decide
the final maximumized coordinates in the y axis. Only after that we
compute the x-coordinates.

14 years agoFix --disable-verbose-compile
Carlos R. Mafra [Thu, 17 Sep 2009 22:23:19 +0000 (18 00:23 +0200)]
Fix --disable-verbose-compile

Remove an extra $(QUIET), as that was causing a few annoying
messages during the compilation of libraries.

14 years agoWINGs shared library generation
Alexey Voinov [Tue, 14 Aug 2007 09:33:22 +0000 (14 13:33 +0400)]
WINGs shared library generation

This patch modifies the linking of the WINGs libraries
to create a shared library. wmaker used to do this, but
it was dropped around wmaker-0.90/0.91.
The shared .so library is needed when compiling and running
the wdm display manager and any other programs which link
to libWINGs.

Submitted by: Gilbert Ashley
Origin: ALT/Sisyphus Linux

14 years agoMaximus: Consider the full_maximize window attribute
Carlos R. Mafra [Wed, 16 Sep 2009 19:54:58 +0000 (16 21:54 +0200)]
Maximus: Consider the full_maximize window attribute

When maximumizing a window which has the full_maximize attribute
set we have to consider two possibilities:

    1. If the new y coordinate is zero it means that no other
       window blocked its maximumization up to the top of the
       screen, so we want to put the titlebar outside.

    2. If the new y coordinate is not zero it means that another
       window in the current workspace blocked its way to y = 0.
       In this case we do nothing with the titlebar.

Note that there is another possible fine tunning which is not
addressed in this patch, which is to consider the resize bar.

14 years agoSimplify wMaximizeWindow() a little bit
Carlos R. Mafra [Wed, 16 Sep 2009 19:16:57 +0000 (16 21:16 +0200)]
Simplify wMaximizeWindow() a little bit

Let's avoid checking the existence of a border every time
we want to adjust the widths. So we'll always subtract the correction
factor, which is zero in case the window has no border.

14 years agoIncrease the readability of SlideWindow()
Carlos R. Mafra [Wed, 16 Sep 2009 03:07:40 +0000 (16 05:07 +0200)]
Increase the readability of SlideWindow()

It is easier to read the computations if the variables
have shorter names. At the same time it avoids reading
the struct array elements repeatedly, so as a bonus
misc.o gets 64 bytes (0.5%) smaller

[mafra@Pilar:wmaker.git]$ size src/misc.o.*
   text    data     bss     dec     hex filename
  11125       0    4104   15229    3b7d src/misc.o.new
  11189       0    4104   15293    3bbd src/misc.o.old

14 years agoFix race condition during workspace changes
Alexey I. Froloff [Sun, 29 Mar 2009 00:14:36 +0000 (29 04:14 +0400)]
Fix race condition during workspace changes

When changing workspaces, after focusing new window, wmaker handles all
pending events.  If it receives another change-workspace combination,
you may end up with a workspace without any focused window.

Ctrf-F1 and Ctrl-F2 used to switch to 1st and 2nd workspaces.
Hold Ctrl and press F1 and F2 almost at the same time.

This patch ignores all change-workspace commands while workspace
change is in progress.

See also https://bugzilla.altlinux.org/show_bug.cgi?id=7230

[crmafra: Thanks to Alexey I. Froloff for the above explanation]

14 years agoYet another trivial coding style cleanup
Carlos R. Mafra [Tue, 15 Sep 2009 18:06:04 +0000 (15 20:06 +0200)]
Yet another trivial coding style cleanup

14 years agoFix the call to XChangeProperty() in 64-bit mode
Carlos R. Mafra [Tue, 15 Sep 2009 10:52:14 +0000 (15 12:52 +0200)]
Fix the call to XChangeProperty() in 64-bit mode

The man page of XChangeProperty() says:

  "If the specified format is 32, the property data must be a
   long array."

And as we call it with format 32, the type of 'data' must
be 'long'. It happens to work nowadays in 32-bit architectures
because sizeof(CARD32) = sizeof(long), but that is no longer
true in 64-bit mode.

This patch was downloaded from
www.openbsd.org/cgi-bin/cvsweb/ports/x11/windowmaker/patches/patch-WINGs_wwindow_c
and I thank Alexey I. Frolov and Vladimir Nadvornik for helping me
to understand it on a wmaker-dev thread.

14 years agoTrivial coding style fix
Carlos R. Mafra [Mon, 14 Sep 2009 20:00:58 +0000 (14 22:00 +0200)]
Trivial coding style fix

14 years agoMac OS X-style window cycling.
Iain Patterson [Mon, 14 Sep 2009 13:37:15 +0000 (14 14:37 +0100)]
Mac OS X-style window cycling.

For those not familiar with the way Macs cycle windows, the Command-Tab
sequence (Alt-Tab elsewhere) switches between DIFFERENT application windows
and Command-Grave (key above tab) switches between windows owned by the
SAME application as is currently focused.  So if you had three Safari and
two Finder windows open, and Safari had focus, Command-Tab would switch to
Finder; Command-Tab would switch back to Safari; Command-Grave would switch
to a different Safari window etc.

This patch implements "something like" the above by only populating the
switchpanel with windows matching the currently-focused WWindow's wm_class
when the new cycling mode is activated.  In practice this means you can
switch to The Next XTerm or The Next Firefox Window using this method.

The configuration names for these new shortcuts are GroupNext and
GroupPrev.  The patch tells WPrefs.app about them.  Of course switching to
The Next Window is still possible with the (unchanged) FocusNext and
FocusPrev keys.

14 years agoSupport Xinerama in wmsetbg.
Iain Patterson [Mon, 14 Sep 2009 13:13:58 +0000 (14 14:13 +0100)]
Support Xinerama in wmsetbg.

Allow wmsetbg to revert to pre-0.90.0 behaviour when choosing a
background image that is large enough to span several heads in a
Xinerama setup.  If the -X flag is passed to wmsetbg, the background
image will be stretched to fill the logical screen (as it would be by
default in older versions of wmsetbg) instead of being tiled across
screens.

14 years agoPad workspace name display.
Iain Patterson [Mon, 14 Sep 2009 12:28:37 +0000 (14 13:28 +0100)]
Pad workspace name display.

Shift the workspace name, shown when switching workspaces, by 32
pixels.  This is purely for aesthetic reasons.  It just looks better
(IMO) than having the name flush against the screen edge.

14 years agoConstrain switching workspace name to one head.
Iain Patterson [Mon, 14 Sep 2009 11:59:10 +0000 (14 12:59 +0100)]
Constrain switching workspace name to one head.

When switching workspaces, force the name to be shown entirely within
one head of a Xinerama display. Previously the name would span heads if
set to TOP, CENTER or BOTTOM alignment, and was hence hard to read when
the display comprised an even number of heads.

14 years agoAdd Maximus key back in WPrefs.app
Carlos R. Mafra [Mon, 14 Sep 2009 14:34:37 +0000 (14 16:34 +0200)]
Add Maximus key back in WPrefs.app

Somehow I had forgotten to include this change in version 2
of the patch.

14 years agoFix the use of uinptr_t
Carlos R. Mafra [Mon, 14 Sep 2009 13:57:52 +0000 (14 15:57 +0200)]
Fix the use of uinptr_t

Remove the additional cast to (int), as that makes no sense.

14 years agox86_64 mmx fixes
Alexey Voinov [Mon, 14 Sep 2009 00:07:20 +0000 (14 02:07 +0200)]
x86_64 mmx fixes

This patch combines two small patches which fix issues with x86_64 and mmx in
the configure script.

Submitted by: Gilbert Ashley
Author: unknown?
Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>

14 years agoUn-maximize window inside current head
Nicolas Bonifas [Sun, 13 Sep 2009 20:28:40 +0000 (13 22:28 +0200)]
Un-maximize window inside current head

If the old_geometry coordinates were saved while the window
was in another xinerama head, use current coordinates as
the old ones to avoid making the window jump heads when
un-maximizing it.

14 years agoMaximus: Use unsigned int for width/height variables
Nicolas Bonifas [Sun, 13 Sep 2009 20:28:40 +0000 (13 22:28 +0200)]
Maximus: Use unsigned int for width/height variables

And move its prototype to actions.h (and also that of
save_old_geometry()).

14 years agoRemove commented code in xinerama.c
Nicolas Bonifas [Sun, 13 Sep 2009 20:28:40 +0000 (13 22:28 +0200)]
Remove commented code in xinerama.c

14 years agoRemove bundled wrlib stuff
Tamas TEVESZ [Sun, 13 Sep 2009 19:05:57 +0000 (13 21:05 +0200)]
Remove bundled wrlib stuff

This patch removes bits and pieces of xmu that for some reason
have been bundled with wmaker. I can very well imagine that at the time
they were bundled, xmu was not, was not available everywhere, or
whatever.

I couldn't come across a system that doesn't have these things in its
system-supplied x libs, though i've been carrying this since january,
and my memory is quite flakey at times.

certainly nothing xorg is at danger, nor xfree86 dating back to at
least 3.3. i believe this stuff should be everywhere that calls itself
to be on par with x11r6.3 at the very least.

it would be incredibly useful if people having access to commercial
unixes could check this on things released in the past, say, 15 years.
i believe back then i had solaris 8+and sco openserver 5+ covered.

14 years agoMaximizing a resized window
Nicolas Bonifas [Sat, 12 Sep 2009 17:45:58 +0000 (12 19:45 +0200)]
Maximizing a resized window

When a maximized window is resized (either using wmaker or because the
application changed the window size), and you want to maximize it again,
you first have to unmaximize it (because wmaker thinks the window is still
maximized), and only then you can maximize it. The following patch
corrects this behaviour.

14 years agoMake left/right maximization work again
Carlos R. Mafra [Sun, 13 Sep 2009 16:28:42 +0000 (13 18:28 +0200)]
Make left/right maximization work again

The patch "Clean up maximization and un-maximization logic" introduced
a regression wrt to the left/half maximization feature, due to a C
operator order precedence issue.

14 years agoAnsify function declaration
Carlos R. Mafra [Sun, 13 Sep 2009 14:05:55 +0000 (13 16:05 +0200)]
Ansify function declaration

14 years agoDelete stale .cvsignore files
Carlos R. Mafra [Sun, 13 Sep 2009 10:59:25 +0000 (13 12:59 +0200)]
Delete stale .cvsignore files

14 years agoFix miniwindows auto-arranging bug
BERTRAND Joel [Thu, 10 Sep 2009 18:30:06 +0000 (10 20:30 +0200)]
Fix miniwindows auto-arranging bug

With this patch, minimized windows do not reshuffle anymore.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361241
where Martin Hinsch reported:

"The behaviour of icons (minimized applications) is severely broken when
 automatic placement is switched on.
  * When switching the workspace icons often stick thereby covering (and
    hiding) icons on the workspace one is switching to.
  * After minimizing an application, clicking (singly or doubly) on one of
    the icons causes all of them to reshuffle, usually in a way that the
    icon in question changes its place (which is extremely annoying).
  * Icon placement ignores the dock so that icons disappear behind
    it/cover it.

 All of these suddenly appeared about a year ago (I think with 91.0). The
 problems are not architecture-specific since they occur in exactly the
 same way on my pentium machine. Wiping the complete configuration (rm -r
 ~/GNUstep) did not make a change either."

14 years agoFix compilation failure
Andreas Tscharner [Tue, 8 Sep 2009 21:05:35 +0000 (8 23:05 +0200)]
Fix compilation failure

This fixes a compilation failure with gcc-4.3.4, where it complains

nxpm.c: In function RGetImageFromXPMData:
nxpm.c:99: error: expected expression before ] token
...

14 years agoFix session saving for apps with shared appicons
Alexey Voinov [Tue, 14 Aug 2007 10:35:24 +0000 (14 14:35 +0400)]
Fix session saving for apps with shared appicons

This patch comes from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git

14 years agoReduce the number of simultaneous inotify events
Carlos R. Mafra [Fri, 4 Sep 2009 13:02:00 +0000 (4 15:02 +0200)]
Reduce the number of simultaneous inotify events

There is no point in having a buffer capable of 512 simultaneous events,
as it will typically be only 1. But increase the value for the length
of the path + filename to 64 (which is a reasonable size for a
typical /home/something/GNUstep/Defaults/WMRootmenu filename).

14 years agoChristmas does not last forever
Alexey Voinov [Tue, 14 Aug 2007 11:32:00 +0000 (14 15:32 +0400)]
Christmas does not last forever

From https://bugzilla.altlinux.org/show_bug.cgi?id=3480

  "If you open "Info Panel" on 25 dec (Christmas), the
   "Christmas tree" is shown. And after that on all days
    Christmas tree is shown. (Until you restart WM, i think)"

Taken from http://git.altlinux.org/people/raorn/packages/WindowMaker.git

14 years agowmrlib: Avoid code duplication
Carlos R. Mafra [Thu, 3 Sep 2009 20:27:25 +0000 (3 22:27 +0200)]
wmrlib: Avoid code duplication

We can put common repeated code into a helper function, and
increase readability a bit.

14 years agoRemove alloca(3)
Alexey I. Froloff [Tue, 24 Mar 2009 14:06:00 +0000 (24 17:06 +0300)]
Remove alloca(3)

And use malloc() instead.

See "Dropped useless use of alloca(3)" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git

14 years agoAtomic save for session
Alexey I. Froloff [Sun, 29 Mar 2009 12:53:00 +0000 (29 16:53 +0400)]
Atomic save for session

This patch is part of "Atomic saves for history and session" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git

14 years agoAdd history to some dialog boxes
Alexey Voinov [Tue, 14 Aug 2007 11:15:37 +0000 (14 15:15 +0400)]
Add history to some dialog boxes

This patch adds history to some dialog boxes. To use it replace %a with
%A in menu file (like in "Run..." menu item). You can specify third
parameter to %A to use different histories for differen dialogs.

All history files is kept in ~/GNUstep/.AppInfo/WindowMaker/ and the number of
history lines controlled by DialogHistoryLines parameter (one for
all dialogs) defaults to 500 lines.

It also adds Tab completion.

Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>

14 years agoAdd option to allow starting DockApps with a single click
Sebastien Bauer [Thu, 3 Sep 2009 02:08:58 +0000 (3 04:08 +0200)]
Add option to allow starting DockApps with a single click

This patch is from the contrib directory. It adds an option to allow starting
DockApps with a single click. It's a handy option that adds only a few lines to
the code.

It is a good feature patch example because it includes modifications
to the WPrefs application so that the feature can be easily enabled or
disabled. The one-click ability allows wmaker to integrate more seemlessly with
programs like ROX-Filer which can be configured to use single or double click
actions.

The README in the contrib/ directory says,

author:
Sebastien Bauer <seb_bauer@bigfoot.com>
John Morrissey <jwm@horde.net>

updated for Window Maker 0.65.0 by:
Daniel Richard G. <skunk@graphics.lcs.mit.edu>

updated for Window Maker 0.80.2 by:
Martial Daumas <martial@nasgaia.org>

update for 0.80.2+ by:
steve lion <steve.lion@verizon.net> and vlaad

14 years agoClean up maximization and un-maximization logic
Carlos R. Mafra [Tue, 1 Sep 2009 01:22:57 +0000 (1 03:22 +0200)]
Clean up maximization and un-maximization logic

We should not try to un-maximize the windows from inside
the function wMaximizeWindow(), as that makes no sense.

If the window is already maximized then we don't call
wMaximizeWindow() anymore and call wUnmaximizeWindow()
instead, which will use the old geometry regardless
of which maximization is active (horizontal, vertical,
maximus, etc). And the old geometry now is also saved
when we enter wMaximizeWindow().

So when we call wMaximizeWindow() or wUnmaximizeWindow()
we really mean "maximize to the specified state" or
"go back to whatever old geometry coordinates we had before".

14 years agoMaximus: Tiled Maximization
Carlos R. Mafra [Tue, 1 Sep 2009 23:37:47 +0000 (2 01:37 +0200)]
Maximus: Tiled Maximization

This patch introduces the "tiled maximization" feature, a.k.a. Maximus.

By pressing the keyboard shortcut associated with Maximus, the focused
window will be maximized to the greatest area satisfying the constraint
of not overlapping existing windows.

14 years agoFix for omnipresent AppIcon bug at startup
Daniel Déchelotte [Tue, 1 Sep 2009 22:05:46 +0000 (2 00:05 +0200)]
Fix for omnipresent AppIcon bug at startup

    Bug overview: right after start up, omnipresent AppIcons (living in the Clip)
    are displayed but non-functionnal.

    How to reproduce it: place two AppIcons in the Clip, make the first one (A)
    omnipresent and leave the second one (B) as is. Make the Clip "autocollapse".
    Switch to the second workspace and restart wmaker. Wmaker starts in the first
    workspace; the Clip is closed (its text color corresponds to the closed state,
    AppIcon B is not shown). However, AppIcon A is displayed.  Moreover, A does
    not react when the Clip expands or collapses.  Finally, a click on A makes it
    disappear. Fortunately, changing to another workspace fixes the problem
    definitively.

    Explanation and correction: internally, wmaker maintains as many clips as
    workspaces. When the user switches to another workspace, the omnipresent
    AppIcons are moved to the new "current" clip. In the situation above (trying
    to reproduce the bug), when wmaker restarts, the omnipresent AppIcons are
    restored in the second workspace, whereas the first workspace is active. In
    the previous code, a "hack" (calling XMapWindow()) unconditionally displayed
    the omnipresent AppIcons. The proposed patch makes sure the omnipresent
    AppIcons are moved to the first workspace on wmaker startup.

14 years agoClean up #ifdef mess
Tamas TEVESZ [Mon, 31 Aug 2009 18:50:30 +0000 (31 20:50 +0200)]
Clean up #ifdef mess

Use enum instead of #ifdef maze for enumerating keybindings

14 years agoGobble "spurious" EnterNotify events when moving an appIcon or a dock
Daniel Déchelotte [Tue, 1 Sep 2009 07:22:37 +0000 (1 09:22 +0200)]
Gobble "spurious" EnterNotify events when moving an appIcon or a dock

This is a bug fix. Bug overview: if an AppIcon is moved rapidly over a Clip
    set to auto-expand, the latter may erroneously auto-expand afterwards.

    How to reproduce it: set a Clip to auto-collapse, and make sure it contains a
    (random) AppIcon, so as to easily visualise its open/close state. Now move
    rapidly an AppIcon over the Clip. Try to move it so fast that the cursor
    sometimes is out of the AppIcon's tile. Then, replace the AppIcon out of the
    Clip.

    Explanation and correction: if, while the AppIcon was being moved, the mouse
    cursor entered at least once in the Clip's tile, the latter is going to
    receive an EnterNotify event (after the AppIcon is replaced) and thus expand
    automatically after the relevant delay. The solution is to simply "gobble"
    (i.e., ignore) all EnterNotify events when moving an AppIcon.

14 years agoFix half_scr_width calculation
klaasvakie [Mon, 31 Aug 2009 21:33:36 +0000 (31 23:33 +0200)]
Fix half_scr_width calculation

Moved the half_scr_width calculation to after the

usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);

call. This fixes the problem where windows that get "half screen
maximized" cover the dock or clip.

14 years agoUse half_scr_width instead of computing it each time
Carlos R. Mafra [Sat, 29 Aug 2009 23:46:50 +0000 (30 01:46 +0200)]
Use half_scr_width instead of computing it each time

Let's use

    half_scr_width = (usableArea.x2 - usableArea.x1)/2;

to shorten the expressions in the left/right half maximize
code.

14 years agoIncrease the readability of wUnshadeWindow() and wShadeWindow() a little bit
Carlos R. Mafra [Sat, 29 Aug 2009 18:02:04 +0000 (29 20:02 +0200)]
Increase the readability of wUnshadeWindow() and wShadeWindow() a little bit

Instead of open coding the animation routines in the function bodies,
put them in a helper function called shade_animate(wwin, what), whose
second argument can be SHADE or UNSHADE.

14 years agoTrivial coding style changes
Carlos R. Mafra [Sat, 29 Aug 2009 16:46:05 +0000 (29 18:46 +0200)]
Trivial coding style changes

Some trivial style changes I made while reading src/placement.c

14 years agok&r->ansi some stuff
Tamas TEVESZ [Fri, 26 Dec 2008 07:31:55 +0000 (26 08:31 +0100)]
k&r->ansi some stuff

ansify and "fix" function pointer declarations

14 years agoLeft Half / Right Half Maximize
Johann Haarhoff [Fri, 28 Aug 2009 19:31:26 +0000 (28 21:31 +0200)]
Left Half / Right Half Maximize

This adds Left Half / Right Half Maximize capability to WindowMaker.
It allows you to maximize a window to only the left or right half
of your screen.

It is useful on widescreen displays where one might to bring up
two different windows side-by-side.