wmaker-crm.git
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.

14 years agoDefine TITLEBAR_HEIGHT in default configuration file
Carlos R. Mafra [Fri, 28 Aug 2009 18:59:47 +0000 (28 20:59 +0200)]
Define TITLEBAR_HEIGHT in default configuration file

...and use it in src/placement.c

And while we are at it, clean up a bit the visual of wconfig.h.in

14 years agoMake wmaker 0.11% smaller by avoiding code duplication
Carlos R. Mafra [Fri, 28 Aug 2009 14:44:54 +0000 (28 16:44 +0200)]
Make wmaker 0.11% smaller by avoiding code duplication

This patch cleans up an obvious code duplication case in the
different "placement" algorithms.

Avoid this needless repetition by using a helper function,
which in turn lets those functions a bit easier to read and
also makes wmaker 0.11% smaller :-)

[mafra@Pilar:wmaker.git]$ size src/.libs/wmaker.*
   text    data     bss     dec     hex filename
 619824   19160    8544  647528   9e168 src/.libs/wmaker.new
 620552   19160    8544  648256   9e440 src/.libs/wmaker.old

14 years agoNightly Build script can now deal with testing and unstable branches.
Martin Dietze [Fri, 28 Aug 2009 16:52:26 +0000 (28 18:52 +0200)]
Nightly Build script can now deal with testing and unstable branches.

14 years agoShow app name in Kill Application dialog
Gilbert Ashley [Wed, 26 Nov 2008 15:27:19 +0000 (26 16:27 +0100)]
Show app name in Kill Application dialog

The "Kill Application" dialog window doesn't always show the
application name when killing DockApps. It shows its wm_class
instead, which is not always the same as the app name.

This patch allows the Kill Application dialog window to show
the application name in the window -- as expressed by using the
basename of the path to the application.

[crmafra: Added wtokensplit() to get only the app name]

14 years agoMiscellaneous fixes from OpenSuse
Vladimir Nadvornik [Tue, 17 Feb 2009 10:55:33 +0000 (17 11:55 +0100)]
Miscellaneous fixes from OpenSuse

These are some of the fixes sent to the wmaker-dev list by
Vladimir Nadvornik, with minor modifications to address Dan
Pascu's concerns.

Original-post: http://lists.windowmaker.info/dev/msg00293.html

14 years agoAdd config option to supress focus requests across workspaces
Carlos R. Mafra [Tue, 25 Aug 2009 19:15:35 +0000 (25 21:15 +0200)]
Add config option to supress focus requests across workspaces

In commit d6c134f420bfa1cd6b6a9474d01548933b559901 ("Do not switch
workspace to follow new windows in others") the default behavior
was changed, and workspace switching to follow focus requests was
strictly forbidden.

Although that seems to be a sane thing to do by default, that raises
concerns about whether Window Maker could be more flexible in that
respect -- allowing the user to choose which applications are or
are not allowed to do that.

This patch adds such configuration, located in the "Advanced Options"
submenu of the top-level "Attributes" menu.

14 years agoAdapted nightly build script to coexist with new 'next' branch.
Martin Dietze [Wed, 26 Aug 2009 11:32:15 +0000 (26 13:32 +0200)]
Adapted nightly build script to coexist with new 'next' branch.

14 years agoFix NULL pointer dereference
Martin Dietze [Wed, 26 Nov 2008 14:56:33 +0000 (26 15:56 +0100)]
Fix NULL pointer dereference

Some weird applications like Safari for Windows running on CXOffice
or some applications running on Wine were causing wmaker to crash.
So let's not rely on a window's `frame' property to be not NULL in
src/wmspec.c.

Original-post: http://lists.windowmaker.info/dev/msg00161.html
See-also: http://lists.windowmaker.info/dev/msg00222.html

14 years agoDo not switch workspace to follow new windows in others
Martin Dietze [Mon, 24 Aug 2009 19:40:47 +0000 (24 21:40 +0200)]
Do not switch workspace to follow new windows in others

New windows should only be focused if they are in the current workspace.
Not performing this check can lead to WM switching workspaces if a
window is opened which:

   (a) is configured to appear in a particular workspace

and

   (b) sends a _NET_ACTIVE_WINDOW message to give focus to
       something, e.g. a sub window.

This behaviour was observed with firefox if a session with more
than one tab open was restored at startup because:

 "If a Client wants to activate another window, it MUST send a
   _NET_ACTIVE_WINDOW client message to the root window:"

Original-post: http://lists.windowmaker.info/dev/msg00442.html

[crmafra: Added comment]

14 years agoAdd debianisation code and automatic build script
Martin Dietze [Mon, 24 Aug 2009 08:20:05 +0000 (24 10:20 +0200)]
Add debianisation code and automatic build script

14 years agoAdd two menu files from the Debian package
Martin Dietze [Mon, 24 Aug 2009 08:10:37 +0000 (24 10:10 +0200)]
Add two menu files from the Debian package

14 years agoAdd GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am
Martin Dietze [Mon, 24 Aug 2009 08:10:03 +0000 (24 10:10 +0200)]
Add GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am

14 years agoUp the version number for the GIT version to 0.93.0-prewmaker-0.93.0-crm
Martin Dietze [Mon, 24 Aug 2009 08:09:26 +0000 (24 10:09 +0200)]
Up the version number for the GIT version to 0.93.0-pre

14 years agoFix format strings
Tamas TEVESZ [Fri, 26 Dec 2008 07:38:18 +0000 (26 08:38 +0100)]
Fix format strings

14 years agoswpanel: Consider also the release of FOCUSPREV
Alexey Voinov [Wed, 14 May 2008 10:04:40 +0000 (14 14:04 +0400)]
swpanel: Consider also the release of FOCUSPREV

The switch panel was not being destroyed with the realease of
FOCUSPREV, only with FOCUSNEXT. Fix this.

One can reproduce this bug as follows.

In the "Keyboard Shortcut Preferences" of WPrefs set "Focus next window"
to e.g. "Alt+Tab" and "Focus previous window" to "Ctrl+Tab".
The switchpanel is not destroyed if we release "Ctrl+Tab" but it
is upon releasing of "Alt+Tab".

Retrieved-from: http://git.altlinux.org/people/voins/packages/?p=WindowMaker.git;a=commit;h=51c95a55c9310f499b1fdeca138106ca7bf74423

[crmafra: Commit log]

14 years agoRemove LITE config option
Carlos R. Mafra [Sun, 23 Aug 2009 16:25:59 +0000 (23 18:25 +0200)]
Remove LITE config option

Why?

     1. The reason for its existence is to "Disable some stuff that are
        duplicated in kde", and I don't think I will ever need that.
        Furthermore, even the description in the configure script reads
        "disable some stuff (dont use it)".

     2. It makes the code uglier at some places, e.g.,

         #ifdef LITE
                {
         #if 0
                }
         #endif
         #else

                if (!wRootMenuPerformShortcut(event)) {
         #endif

        which by the way is the ugliness which motivated this patch.

     3. Does not even compile anymore. It fails with

          CC dockedapp.o
          CC event.o
       event.c: In function 'executeButtonAction:
       event.c:711: error: WScreen has no member named root_menu
       event.c:712: error: WScreen has no member named root_menu
       event.c:713: error: WScreen has no member named root_menu
       event.c:715: error: WScreen has no member named root_menu
       event.c:720: error: WScreen has no member named switch_menu
       event.c:721: error: WScreen has no member named switch_menu
       event.c:722: error: WScreen has no member named switch_menu
       event.c:724: error: WScreen has no member named switch_menu
       make[2]: *** [event.o] Error 1
       make[1]: *** [all] Error 2
       make: *** [all-recursive] Error 1

       But instead of fixing this (it would be trivial), let's get
       rid of the whole ugliness altogether.

14 years agoAdd spaces to gcc 'case' range extension
Carlos R. Mafra [Sun, 23 Aug 2009 15:28:04 +0000 (23 17:28 +0200)]
Add spaces to gcc 'case' range extension

According to the gcc manual, that is safer.

14 years agoFix function prototype declaration
Carlos R. Mafra [Sun, 23 Aug 2009 13:15:29 +0000 (23 15:15 +0200)]
Fix function prototype declaration

It is safer if the functions are declared with proper
prototype specifications.

This patch addresses some of the warnings with -Wstrict-prototype,
like this:

event.c:105: warning: function declaration isn't a prototype

14 years agoWPrefs: Fix crash due to wtokenfree() memory leak fix
Pedro Martelletto [Fri, 17 Aug 2007 17:43:25 +0000 (17 10:43 -0700)]
WPrefs: Fix crash due to wtokenfree() memory leak fix

After the fix to avoid a memory leak in wtokenfree(), WPrefs crashes
when opening the 'Applications Menu Definition' dialogue.

The problem is that WPrefs code relied on the fact that the first token
in the array would not be free'd by wtokenfree(), a misbehaviour which
is correctly addressed with this patch.

Retrieved-from: http://www.mail-archive.com/ports@openbsd.org/msg12731.html

[crmafra: small changes in the commit log from the webpage]

14 years agoWINGs: Fix memory leak in wtokenfree()
Tobias Stoeckmann [Sun, 18 Feb 2007 02:47:47 +0000 (18 03:47 +0100)]
WINGs: Fix memory leak in wtokenfree()

wtokenfree() does not free the first entry of an array.
If count is 1 then

   while (--count)

will be

   while (0)

and the inner body of that while-loop will not be entered.
Therefore a memory leak happens every time wtokenfree() is called.

Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/patches/

[crmafra: This patch, altough correct, breaks WPrefs.app, which will be
fixed by the next patch. ]

14 years agoswpanel: Start with the first window when all are minimized
Nicolas Bonifas [Sat, 22 Aug 2009 10:24:58 +0000 (22 12:24 +0200)]
swpanel: Start with the first window when all are minimized

When all windows are minimized, the switch panel cursor is
initially on the second window in the list. With this patch
it will be on the first window.

14 years agoswpanel: Fix stacking issue with swpanel escape handling
Carlos R. Mafra [Sat, 22 Aug 2009 01:03:14 +0000 (22 03:03 +0200)]
swpanel: Fix stacking issue with swpanel escape handling

Daniel Déchelotte reported one problem with the escape handling in
the switchpanel:

   "Start with two windows: a fullscreen one, and a smaller window
    that appears above the fullscreen one. With the mouse, focus the
    bigger window. Start alt-tabbing, then press Escape. The bigger
    window will then be focused (good) *and raised* (small problem)."

Fix this by adding a test for the escape key before calling
raiseWindow().

14 years agoswpanel: Factor out if (swpanel) test
Carlos R. Mafra [Sat, 22 Aug 2009 00:55:45 +0000 (22 02:55 +0200)]
swpanel: Factor out if (swpanel) test

We can remove redundand tests in each "case:" inside the
switch if we do it in the beginning.

14 years agoswpanel: Clean up "case ButtonRelease"
Carlos R. Mafra [Sat, 22 Aug 2009 00:46:17 +0000 (22 02:46 +0200)]
swpanel: Clean up "case ButtonRelease"

Get rid of 2 tabs indentation by removing a
not-strictly-necessary temporary variable.

14 years agoswpanel: Clean up StartWindozeCycle() a bit more
Carlos R. Mafra [Sat, 22 Aug 2009 00:34:25 +0000 (22 02:34 +0200)]
swpanel: Clean up StartWindozeCycle() a bit more

We can put the test for 'newFocused' inside change_focus_and_raise()
to clean up the code a little bit.

14 years agoFix multiple errors in findfile.c
Tobias Stoeckmann [Sun, 18 Feb 2007 13:48:33 +0000 (18 14:48 +0100)]
Fix multiple errors in findfile.c

Problems:

1.

  During expansion of path, the resulting path can overflow the supplied
  area of PATH_MAX+2 (buffer as well as buffer2). A tampered environment
  variable can be used to modify program flow.

Proof:
      [note: wmaker has been compiled with propolice]
      $ export A="[tested with 4096x A]"
      $ GNUSTEP_USER_ROOT="\$A\$A/\$A/\$A/" wmaker --for-real
      *** stack smashing detected ***: wmaker terminated
      Aborted

2.

  Way too many functions handle a return value of NULL for wexpandpath
  improperly, resulting in segfaults (and maybe other problems). To
  prove the existance of these issues:

Proof:
      $ GNUSTEP_USER_ROOT=~nouser wmaker --for-real
      wmaker error: could not get password entry for user nouser: Success
      Segmentation fault

Solution:

     hard exit with error message about what is going on.

3.

  The improper parsing of environment variables can lead to expansion
  of path names that were not intended to be expanded.

     (a) If a string like "$(var" is found, Window Maker tries to expand "var"
       (environment variable) although the syntax is wrong.

Proof:

      $ export PROOF=foo
      $ GNUSTEP_USER_ROOT=/\$\(PROOF wmaker --for-real
      wmaker warning: could not find user GNUstep directory (/foo/Defaults/WindowMaker).

      (b) If the variable out of a) cannot be resolved, a closing bracket will be
         added.

Proof:

      $ unset PROOF
      $ GNUSTEP_USER_ROOT=/\$\(PROOF wmaker --for-real
      ./wmaker warning: could not find user GNUstep directory ($(PROOF)/Defaults/WindowMaker).

Author: Tobias Stoeckmann
Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/
Submitted-by: Gilbert Ashley <amigo@ibiblio.org>
14 years agoRemove useless tests
Daniel Déchelotte [Sun, 5 Mar 2006 18:41:47 +0000 (5 19:41 +0100)]
Remove useless tests

There is no point in checking

      if (dock_state)

if the function would have already returned with
the check if(!dock_state) right above.

Retrived from http://yo.dan.free.fr/wmaker.phtml.en

[crmafra: wrote the commit message]

14 years agoFix use of uninitialized variable
Carlos R. Mafra [Fri, 21 Aug 2009 00:20:27 +0000 (21 02:20 +0200)]
Fix use of uninitialized variable

Gcc-4.3.2 warns:

texture.c: In function 'wTextureMakeFunction':
texture.c:393: warning: 'fallbackColor.pixel' is used uninitialized in this function

Based on a patch by Vladimir Nadvornik.

14 years agoLess strict font requirements
Vladimir Nadvornik [Fri, 21 Aug 2009 00:09:34 +0000 (21 02:09 +0200)]
Less strict font requirements

Fixes bug:

  https://bugzilla.novell.com/show_bug.cgi?id=154758

14 years agoFix findBestIcon()
Vladimir Nadvornik [Thu, 20 Aug 2009 23:49:24 +0000 (21 01:49 +0200)]
Fix findBestIcon()

This patch fixes the issue described here:

https://bugzilla.novell.com/show_bug.cgi?id=371974

14 years agoFix "smart" placement bug when there are shaded windows in other workspaces
Daniel Déchelotte [Sun, 5 Mar 2006 18:42:57 +0000 (5 19:42 +0100)]
Fix "smart" placement bug when there are shaded windows in other workspaces

Bug overview:
    New windows are sometimes mis-placed when the "smart" algorithm is used.

How to reproduce it:
    be sure (with WPrefs.app, for instance) to use the so-called "smart"
    window placement algorithm. In an empty workspace, open a first window
    (for instance, an xterm). The window should appear at the upper left corner.
    Shade it (hide its contents below its title bar by double-clicking on it)
    and select another empty workspace. Open another window. Instead of placing
    it at the exact same place as the first window, wmaker places the new
    window a little bit lower, or frankly to the right.

Explanation and correction:
    when placing a new window, wmaker avoided all shaded windows, instead of
    only avoiding the shaded windows on the active workspace.

14 years agoFix focus issues with the switch panel and auto-focus
Daniel Déchelotte [Tue, 18 Aug 2009 22:50:49 +0000 (19 00:50 +0200)]
Fix focus issues with the switch panel and auto-focus

1. Setup two windows in a workspace, one at the center and the
   other at a corner. Move the mouse to the center of the screen, so
   that the focus goes to the center window. Now, with the help of the
   keyboard (with Alt-tab, typically), try and switch the focus to the
   other window. In doing so, the switch panel shows up, gives the
   focus to the other window and then disappears. However, its
   disappearance make it seem to wmaker that the mouse has just
   entered the center window, so wmaker gives the focus to that
   window again.

   2. It is a lit bit more involved. "Raise window when switching
   focus with keyboard" needs to be set. In a given workspace, maximize
   a first window A, then setup "above" window A two windows B and C
   (one in the upper left corner and the other one in the lower right
   corner, for example). Move the mouse so as to give the focus to
   window B. Press the Alt key, hit the key tab once (window A moves
   up to the "top"), then another time (window C is then selected).
   Eventually relase the Alt key: window B is given the focus again.

Correction: it is a matter of ignoring some (EnterNotify) events
when the switch panel is active or has just been used.

14 years agoEscape key handling in switchpanel
Carlos R. Mafra [Thu, 20 Aug 2009 14:00:26 +0000 (20 16:00 +0200)]
Escape key handling in switchpanel

Pressing the escape key (ESC) while the switchpanel is active
cancels it and gives the focus back to the window which had it
before the switchpanel was invoked.

If all windows are minimized before the switchpanel was called,
they will continue to be if ESC is pressed.

In other words, pressing ESC is like going to the parallel universe
where you never entered the switchpanel in the first place.

Based on a patch by Nicolas Bonifas from 17.08.2009.

14 years agoUse helper function in StartWindozeCycle()
Carlos R. Mafra [Thu, 20 Aug 2009 13:38:12 +0000 (20 15:38 +0200)]
Use helper function in StartWindozeCycle()

This way we avoid code duplication in 6 places.

This changes the previous behavior of the first
instance because the helper function has an extra

       CommitStacking(scr);

 compared to the original code. But it should not
 hurt to have it.

14 years agoClean up coding style in StartWindozeCycle()
Carlos R. Mafra [Thu, 20 Aug 2009 03:30:39 +0000 (20 05:30 +0200)]
Clean up coding style in StartWindozeCycle()

No functional changes were made apart from
setting the various KeyCode variables at the
same time as defining them.

14 years agoClean up StartWindozeCycle()
Carlos R. Mafra [Thu, 20 Aug 2009 02:07:15 +0000 (20 04:07 +0200)]
Clean up StartWindozeCycle()

We can get rid of one overall tab by moving the

   if(swpanel)

test -- which was done everytime in each individual case --
to the beginning, therefore encompassing all cases.