Subject: FVWM: Re: Bugs, problems, wishes and praises

From: <[email-masked]> (Charles Hines)
Date: Thu, 14 Dec 1995 13:50:41 -0500

>>>>> "Andy" == spiegl  <[email-masked]> writes:

Andy> Hi Chuck,

Hi Andy.

Andy> either you didn't get my mails "Bugs, problems, wishes and
Andy> praises" and "Slow reading of Menus with mini icons" to the list
Andy> this time, or I didn't get your reply.  The third possibility
Andy> would be that you didn't respond (yet) to it.

Andy> Last time you said you would respond to all comments, questions,
Andy> etc. and especially bug reports.  And as far as I can see you
Andy> always did to other people's mails.

I did read your note when it came in and started to look into some of
the problems (like the coredump on $9), and I remember someone else
responding to some of the other ones.  I thought I had responded to
it, but apparently not.

I beg your forgiveness, as I have been terribly busy lately.  If a
note takes only a few seconds to investigate and respond to, I try and
respond right away, but if it takes a little while then my real work
obviously takes precedence and sometimes I forget to return to looking
into the problems.  Since your note was so long and covered some non
obvious problems, it fell into the latter category.

I'm sure I've unintentionally slighted a few people this way, and I
apologize to you (especially since this is like the 2nd or third time
I've lost track of one of your's) and to anyone else who thinks I'm
just discarding or ignoring their notes.

I came back from lunch early, so I'll respond right now:

>>>>> "Andy" == spiegl  <[email-masked]> writes:

Andy> Hi Chuck,
Andy> a few weeks ago you wrote:
>> > I usually save the notes that come in for a while though - I'll look
>> > back over them and see if I have any of yours that I haven't
>> > addressed.

Andy> I responded:
Andy>> Thanks.  I understand that you are busy (so am i :-).  If you don't
Andy>> find the reports/questions I sent to the list, ie. if you don't
Andy>> respond to them, I'll just repost them to the list.  Okay?

Yes, if I ever forget to respond, please give me a gentle nudge after
a few weeks by resending any reports...

Andy> So, here is a recompilation of my reports/requests:

Andy> 1.) .fvwm2rc:
Andy>     I get a coredump right after fvwm2 starts, when I ask for this:
Andy>  AddToFunc XSETROOT_b "I" exec xsetroot -bitmap $0 $1 $2 $3 $4 $5 $6 $7 $8 $9

Andy>     But it works fine when I ask for this:
Andy>  AddToFunc XSETROOT_b "I" exec xsetroot -bitmap $0 $1 $2 $3 $4 $5 $6 $7 $8

Andy>     I checked the man page for fvwm2 and it says $0 - $9 is fine, though.

I started looking into this problem.  The 'expand' routine which
handles these looks for 0-9 as being valid, but it's referencing a
passed in value by this.  If that passed in value isn't allocated as
10 char *'s, there could be trouble.  I'm looking through the code
again right now...  Oooh.  I think I found the problem.  In
functions.c in ExecuteFunction, it resets the 'arguments' array so all
of it's members are NULL, sort of:

  char *arguments[10];

  for(j=0;j<9;j++)
    arguments[j] = NULL;

It's forgetting to reset the last one ([9])...  If you try changing
this to:

  char *arguments[10];

  for(j=0;j<10;j++)
    arguments[j] = NULL;

Your coredump should go away, I believe.  Not every system will have
this problem, as some of them will automatically set those values to
be NULL.  Your system probably isn't one of these...  I've fixed this
for the next release.

Andy> 2.) FvwmWinList:
Andy>     *truncateleft doesn't work.  It still truncates right.

I recall the author of FvwmWinList responding to this himself.  I
believe his response was that it should be *FvwmWinListTruncateLeft,
and that it worked for him locally.

Andy> 3.) FvwmTalk:
Andy>     It doesn't accept module specifications like "*FvwmWinListUseIconNames"
Andy>     The error message is:
Andy>       "No such module /usr/local/lib/X11/fvwm2 *FvwmWinListUseIconNames"

This has been on the TO-DO list for a while, I believe, in the
Bugfixes section:

  - Increase FvwmTalk capabilities (like module config options)

Andy> 4.) Okay, here is a tricky one:
Andy>     In my .fvwm2rc I got:
Andy>  Key Up          A       SC      CursorMove  0 -1
Andy>  Key Down        A       SC      CursorMove  0 +1
Andy>  Key Up          A       SM      CursorMove  0  -10
Andy>  Key Down        A       SM      CursorMove  0  +10

Andy>     This works beautifully, unless a (popup) menu is open.  In that
Andy>     case Shift-Control-<cursor> (and even Shift-<cursor>) acts just
Andy>     like Shift-Meta-<cursor>.  Apparently the Meta-Flag is set while
Andy>     a menu is open.  Strange.
Andy>     Control-<cursor> also moves the cursor, but it seems like in
Andy>     tenths of a step.

When menus are poped up, they intercept arrow keys and (interestingly
enough) Emacs like key sequences for cursor movement.  I don't know if
this is documented anywhere though.  I'll have to check.

Andy> 5.) This is not a bug, but two questions:
Andy>     a) Did fvwm1's 'Cursor' command disappear completely, or is it
Andy>        just hidden somewhere?  If it's gone, why?

Yes it's gone.  The TO-DO list has plans to ressurect it.  Don't know
why it dissappeared.

Andy>     b) What about fvwm1's commands "AppsBackingStore" and "BackingStore"?
Andy>        Are they gone, too?  Why?

Again, not sure why.  My first guess would be the lack of Style flags
available, so some stuff had to be sacrificed.  There isn't a lot of
code associated with these, so they could probably be brought back
after the seemingly mythical Style flags code rewrite that I keep
mentioning...

Also, using BackingStore does eat a lot of extra memory, I believe.

Andy> 6.) Another question, but more tricky I am afraid:
Andy>     How can I specify that an iconified FvwmPager always opens up
Andy>     at -1+1 ?  In order to simulate the old builtin pager, I got this:
Andy>  AddToFunc InitFunction    "I" Module FvwmPager 0 1
Andy>  *FvwmPagerHilight lightsteelblue
Andy>  *FvwmPagerGeometry -1+1
Andy>  *FvwmPagerLabel 0 Standard
Andy>  *FvwmPagerLabel 1 Extended
Andy>  *FvwmPagerSmallFont 5x8
Andy>  *FvwmPagerDeskTopScale 35
Andy>  *FvwmPagerStartIconic

Andy>     It starts up iconic, just like I want to have it, but of course
Andy>     it always shows up where all the other icons are, too.  But I
Andy>     want to have it at the upper right corner.  Is that possible?

Use the Style command to give it it's own IconBox to place it there,
would be the easiest way.

Andy> 7.) I would like to second the wish for "OpaqueResize" and for
Andy>     "TogglePage" and my personal wish would be a window-specific
Andy>     AutoRaise command/module, like a style-command or so.

All basically on the TO-DO list already.

Andy> 8.) Still playing around with fvwm 2.0.38 I found that the behavior
Andy>     of complex functions is a little different than what I was used
Andy>     to from fvwm 1.24r.  I have the following function defined:

Andy>  AddToFunc WindowOps-or-Kill      "M" Menu Window-Ops2 Nop
Andy>  +                                "C" Menu Window-Ops2 Nop
Andy>  +                                "D" Delete
Andy>  +                                "D" Close
Andy>  +                                "D" Destroy

Andy>     What I thought this would do when I double click is this:
Andy>      1.) try to Delete the window
Andy>      2.) if 1.) failed try to Close the window
Andy>      3.) if 2.) failed also, Destroy the window.

Andy>     But what happens is that the window always gets destroyed.
Andy>     Is this a bug or a feature?  If it's a feature would it be
Andy>     possible to make this behavior optional?

I'll have to look into this a little further.  It sounds like a
reasonable request, but I don't know how easy it'll be.

Andy> 9.) There is a DestroyMenu for re-defining Menus and Functions, which
Andy>     is a very nice feature.  Now I was wondering whether something
Andy>     similar can be done with module options?  Something like
Andy>     DestroyModule, to get back to the default behavior of the module?
Andy>     (I am not talking about KillModule)

This might be possible.  I'll add it to the TO-DO list.

Andy>     Since it's not possible to supply module options in FvwmTalk, it's
Andy>     necessary to restart fvwm2 whenever I changed something in my
Andy>     FvwmButtons.  That's too bad, since I can redefine everything
Andy>     else, like menus, funcs, etc.

See my response to #3 above.

Andy> 10) In a recent posting, Makoto 'MAR_kun' MATSUSHITA wrote that there are
Andy>     a few FVWM modules out there which are not part of the standard
Andy>     distribution (FvwmAdlLog, FvwmIconMan-0.2, FvwmWish-0.8,
Andy>     fvwish-1.0, and tkfvwm0.5 and maybe more).  Could you possibly
Andy>     put those into the distribution, let's say in a (unsupported)
Andy>     contrib directory?  I bet many people are interested in them.

I don't have all of these, but I do have some.  I don't plan on
putting them into the distribution just yet, but I would like to put
pointers to all of them in the FAQ until I decide to put some of them
into the distribution.  If someone knows where any or all of these
reside, please mail me the locations!

Andy> Finally I have to mention (as always):
Andy> --> FVWM is a *fabulous* vwm!  <--

I'm glad you still like it, even with all the above items. :)

Chuck

*******************************************************************************
Charles K. Hines <[email-masked]>
IBM Logic Synthesis developer [BooleDozer (TM)]
Martial Arts Instructor [Modern Arnis, Presas Style Filipino Martial Arts]

IBM Internal email:                        "Go back to sleep, Chuck.  You're
  [email-masked],              just havin' a nightmare--of course,
  HINESC at FISHKILL, HINESC at FSHVMFK1    we are still in Hell." Gary Larson
*******************************************************************************
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Wed, 20 Dec 1995 15:44:11 +0100 (MET)

Hi Chuck,

> I beg your forgiveness, as I have been terribly busy lately.
Granted. :-)
No, seriously, I fully understand that you are busy.  I just somehow
wanted to see that my message got there.

> I came back from lunch early, so I'll respond right now:
Thanks!

> and that it worked for him locally.
Correct.  Unfortunately it doesn't work for me.
But I guess, there are more serious things to be concerned about.

> would be the easiest way.
That's a good idea.  I tried it right away, but so far haven't found
the right coordinates for the iconbox, so that it really shows up where
I want it to be.  Very tricky.

> reasonable request, but I don't know how easy it'll be.

The way I understand it, it should be very easy, since fvwm1 did do this
already.  On the other hand there may be many internal changes that I am
not aware of that make it impossible to port the v1 code to fvwm2.
Is that the case?

> This might be possible.  I'll add it to the TO-DO list.
Great!

> I'm glad you still like it, even with all the above items. :)
FVWM is the only window manager that really deserves being used.

Thanks for your time,
 Andy.
___________________________________________________________________________
  Andy Spiegl, Institute for Applied Mathematics
  University of Technology, Muenchen, Germany
  E-Mail: [email-masked]
  http://www.appl-math.tu-muenchen.de/~spiegl/

Above all else - sky.

---

From: [email-masked] (Robert Nation 885-9815)
Date: Wed, 20 Dec 95 10:27:11 EST

>> Andy>  +                                "D" Delete

Fvwm checks to see if the window understands the "Delete" protocol. Not all
windows do. If it understands "Delete", fvwm sends the delete message
to the window. If the program operating the window is working well, it
will remove itself sometime in the relatively near future. (May not be
immediate, the application may pop-up a confirm box, may save its state,
whatever). As far as fvwm is concerned, the "Delete" action is done when
the message is sent, even if the window still exists.

> Andy>  +                                "D" Close
Similar to delete, but if the window doesn't understand "Delete", the window
is destroyed. At this point, you have either sent two delete messages, or
have beeped and destroyed the window. When destroying a window, Fvwm 
actually removes the window, and the program usually, but not always,
crashes.

> Andy>  +                                "D" Destroy
This will make fvwm actually destroy the window. Chances are, this will
happen before any of the "Delete" messages are handled by the application.

While it would be nice for fvwm to send a delete message, and then wait
to see if the window goes away, and then destroy the window if its not
responding, this is difficult to code up. What if the program pops up
a confirm dialog before going away? The delay could be indefinite.

The correct thing to put in your menu, is a simple "Close" this will
correctly remove all windows, except those that understand "Delete" and
are misbehaving (crashing, poorly written, whatever). To handle the case
of a misbehaving window, have a separate item "Destroy" which you invoke only
if the window doesn't respond to "Close"

Rob

---

From: [email-masked]
Date: Wed, 20 Dec 1995 17:35:24 +0100 (MET)

Hi Rob,

thanks a lot for your long answer.  I see that I misunderstood
fvwm's behavior.

> a confirm dialog before going away? The delay could be indefinite.
You're right.  I can see the problem.

Chuck, you can take this off of the TO-DO list again.  But maybe it would
make sense to put Rob's answer into the FAQ.

> if the window doesn't respond to "Close"
I now changed Delete to Close and got the behavior I was wishing to
have.  I added a special menu item and keyboard shortcut for the
destroy option, in case Close doesn't work.

Thanks again,
 Andy.

Above all else - sky.