Subject: Re: FVWM: 2.0.45 and default MiniIcon

From: Romano Giannetti <[email-masked]>
Date: Wed, 5 Feb 1997 09:04:54 +0100 (MET)

On Tue, 4 Feb 1997, Albrecht Kadlec wrote:

> >>>>> Romano Giannetti writes:
> 
> R> Buttonstyle 1 MiniIcon
> R> Style "*" MiniIcon jf.xpm
> R> Style "rxvt" MiniIcon jterm.xpm
> 
> so, if you say:
> Style "emacs" MiniIcon
> 
> emacs will have a mini icon, but as you specified no name, it will be
> empty. If you just leave out the MiniIcon from the emacs style, it should
> inherit the miniIcon jp.xpm from the "*" style.

Yes, this is what I meant: it seem that it is not happening. If I open 
a window for which I have no Style specification (say, xchomp) it does not
inherit the miniicon from the * style. 2.0.45 on Linux Xfree 3.1.2.
> 
> 
> R>    And... the "dot sticking cursor bug" is not resolved. I can reproduce 
> R> it in fvwm 2.0.45, too. (Please refer to an old message from myself 
> R> explaining how to reproduce it).
> 
> you mean that no window is focused on startup ?

No. :-) It's a bad interaction between AutoRaise and Fvwm, let me paste 
again the way to reproduce it:

   Run FvwmAuto 1500
   From the focused and raised xterm: run xcalc 
   Rapidly, choose from the first button windows menu of the calc
            the close option, in such a way that when the xcalc will 
            disappear, your mouse pointer is on the original xterm

If you have done this quite rapidly (before 1500 ms, I think, but I have 
not verified) the cursor is sticky to a big black dot and you have to 
click anywhere to be able to work again. 

Well, I am in a rush now, so if you like I will send you more info 
at lunch time. Thank you for your time,
					Romano

------------------------------------------------------------------
Dr. Romano Giannetti     Dip. di Ingegneria dell'Informazione 
Researcher               Elettronica Informatica Telecomunicazioni
[email-masked]      University of Pisa
------------------------------------------------------------------

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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] (Albrecht Kadlec)
Date: Fri, 7 Feb 97 22:00:38 +0100

> you mean that no window is focused on startup ?

R> No. :-) It's a bad interaction between AutoRaise and Fvwm, let me paste 
R> again the way to reproduce it:

R>    Run FvwmAuto 1500
R>    From the focused and raised xterm: run xcalc 
R>    Rapidly, choose from the first button windows menu of the calc
R>             the close option, in such a way that when the xcalc will 
R>             disappear, your mouse pointer is on the original xterm

R> If you have done this quite rapidly (before 1500 ms, I think, but I have 
R> not verified) the cursor is sticky to a big black dot and you have to 
R> click anywhere to be able to work again. 

when you have the dot cursor, click on a lowered window.
it's raised, so the dot cursor is from a pending raise action.
Why is the action pending?

Because the windowid doesn't exist any more (window already closed).
(if the window id is invalid, raise waits for the user to click on a window)

But FvwmAuto can't easily test, if the window still exists (well it could
keep track of close/destroy/unmap events)

It's easier to pass on the test to Fvwm2, which knows, if the window still
exists. So FvwmAuto should probably use sth like:

	AddToFunc raise_if_exist "I" WindowId $0 raise
	FvwmAuto 1500 raise_if_exist

and give the function the windowid as parameter (like the windowlist does)

problem is:
	chuck rejected my idea of adding windowid parameter support to all
	functions which need a window (or let the user choose one), when I
	did the windowlist rewrite (which he in term rewrote afterwards)

	So to use the added parameter with raise or other builtin
	window-based functions, you'll always have to write a wrapper
	function. 

	Functions that do use a parameter (like Iconify) will misinterpret
	this parameter, so even if you don't use the argument, you'll have
	to write a wrapper that discads that argument for these.

I don't like this situation at all.
I also don't like the patch below very much, but at least it works.

albrecht

21:48 einstein:~/bin/tools/fvwm-2.0.45/modules/FvwmAuto> diff -wc FvwmAuto.c~ Fv
wmAuto.c
*** FvwmAuto.c~ Mon Jan 27 15:29:11 1997
--- FvwmAuto.c  Fri Feb  7 21:40:20 1997
***************
*** 77,82 ****
--- 77,83 ----
  {
      char                 *enter_fn="Raise",   /* default */
                     *leave_fn=NULL,
+                    func_mesg[255],
                     mask_mesg[80];
      unsigned long  header[HEADER_SIZE],
                     *body,
***************
*** 162,168 ****
        {
            if (last_win && leave_fn)   /* if last_win isn't the root */
            {
!               SendInfo(fd,leave_fn,last_win);
  #ifdef DEBUG
                fprintf(stderr,"[FvwmAuto]: executing %s on window 0x%08lx\n",le
ave_fn,focus_win);
  #endif
--- 163,170 ----
        {
            if (last_win && leave_fn)   /* if last_win isn't the root */
            {
!               sprintf(func_mesg,"%s 0x%08lX",leave_fn,last_win);
!               SendInfo(fd,func_mesg,last_win);
  #ifdef DEBUG
                fprintf(stderr,"[FvwmAuto]: executing %s on window 0x%08lx\n",le
ave_fn,focus_win);
  #endif
***************
*** 169,175 ****
            }
            if (focus_win && enter_fn)  /* if focus_win isn't the root */
            {
!               SendInfo(fd,enter_fn,focus_win);
  #ifdef DEBUG
                fprintf(stderr,"[FvwmAuto]: executing %s on window 0x%08lx\n",en
ter_fn,focus_win);
  #endif
--- 171,178 ----
            }
            if (focus_win && enter_fn)  /* if focus_win isn't the root */
            {
!               sprintf(func_mesg,"%s 0x%08lX",enter_fn,focus_win);
!               SendInfo(fd,func_mesg,focus_win);
  #ifdef DEBUG
                fprintf(stderr,"[FvwmAuto]: executing %s on window 0x%08lx\n",en
ter_fn,focus_win);
  #endif
***************
*** 178,182 ****
        }
      }
  }
-

--- 181,184 ----
-- 
I got no clause in my contract, got no shares in my name
I'm just charting the single in a bachelor's game -- Marillion
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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] (Albrecht Kadlec)
Date: Fri, 7 Feb 97 22:28:30 +0100

> Romano Giannetti writes:
R> And... the "dot sticking cursor bug" is not resolved. [...]

A>	AddToFunc raise_if_exist "I" WindowId $0 raise
A>	FvwmAuto 1500 raise_if_exist
[Patch for FvwmAuto]

well 
	AddToFunc raise_if_exist "I" WindowId $w raise
	FvwmAuto 1500 raise_if_exist

would have worked without the patch, since $w isn't expanded, if the
current windowid is invalid. And there is no WindowId "$w", so raise isn't
called.

;-)

albrecht