Re: FVWM: bug in CleverPlacement

From: Dominik Vogt <dominik.vogt_at_planet-interkom.de>
Date: Wed, 30 Dec 1998 19:58:49 +0100

On Wed, Dec 30, 1998 at 09:10:28AM -0800, Trent Piepho wrote:
> There seems to be some kind of bug in the Smart placement code. The placement
> of windows gets messed up if there is an iconized window with no icon. To
> demonstrate, try this. Add this to the end of your .fvwm2rc or via FvwmTalk:
>
> Style "*" NoIcon
> GlobalOpts SmartPlacementIsReallySmart
>
> Now make your desktop mostly empty. Start some program and iconize it, then
> start a second copy. It should appear right where the first one did, but
> instead it will appear at some other odd place.
>
> The fvwm2 code is really a mess to me,

Well, perhaps it comforts you that I've see *much* worse code.

> but the problem looks like the function
> test_fit in placement.c
>
> There is some code that does this:
>
> if((testw->flags & ICONIFIED)&&
> (testw->icon_w)) {
> if(testw->flags & ICON_UNMAPPED)
> continue;
> ... stuff with icon position ...
> } else {
> ... stuff with window position ...
> }
>
> It looks like iconified windows with no icon will take the branch that uses
> the window position for calculations. Here is a patch that seems to have
> fixed it for me.

Looks right to me. I'll apply the patch soon.

BTW, when you create a patch next time, please use the
-c or -u options to diff (contextual/unified diff). Simple
diffs cannot be applied automatically by the patch program
and I tend to make a typo even with cut-and-paste.

Thanks

Dominik

-- 
Dominik Vogt, dominik.vogt_at_planet-interkom.de
Reply-To: dominik_vogt_at_hp.com
--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu Dec 31 1998 - 03:01:35 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST