Subject: CVS domivogt: * Rewrote some binding code and rewrote Olivier's bugfix. I believe the bugfix

From: CVS <[email-masked]>
Date: Wed, 4 Oct 2000 19:49:14 -0500 (CDT)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	00/10/04 19:49:13

Modified files:
	.              : ChangeLog NEWS todo-2.4 
	fvwm           : bindings.c focus.c functions.c fvwm.c fvwm.h 
	                 icons.c misc.c move_resize.c 
	libs           : Bindings.c defaults.h fvwmlib.h 
	modules        : ChangeLog 
	modules/FvwmButtons: FvwmButtons.c 
	modules/FvwmDragWell: fvwmDragWell.c 
	modules/FvwmForm: ReadXServer.c 
	modules/FvwmIconBox: FvwmIconBox.c 
	modules/FvwmIconMan: readconfig.c x.c 
	modules/FvwmIdent: FvwmIdent.1 FvwmIdent.c FvwmIdent.h 
	modules/FvwmTaskBar: FvwmTaskBar.1 FvwmTaskBar.c 
	modules/FvwmWinList: FvwmWinList.1 FvwmWinList.c 

Log message:
* Rewrote some binding code and rewrote Olivier's bugfix. I believe the bugfix
did not hit the spot. Can anybody try Purify again?
* FvwmIdent can be restarted by clicking button 2 in its window.
* Made the number of supported buttons a macro in defaults.h and adapted fvwm
and the modules to use is.

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 06 Oct 2000 08:28:05 +0200

> did not hit the spot. Can anybody try Purify again?

Dominik,

I think there are some bugs in your bugfix:
Try:
Mouse 1 	T	A	Move
You can move the with with the title bar
Mouse 1 	T	M	Raise
this is no more possible.

As I say when I explain my buhfix, we cannot use
MatchBinding to decide if we are going to remove
a binding (the second binding above match the
first one, and so the first is removed when you
add the second one). It seems to me that the
better way to remove a binding is to use a libs
function which try to remove it using an _exact test_ 
and then answer the removed bindings if the binding 
is removed and null if not (so that the caller can
do things with the removed bindings). I do not 
understand why you do not like this solution (I am 
not a professional of concrete programmation).

An other possibility is to use an other version of
MatchBindings which will test if the binding will
be _really_ removed, but so we have to be always
sure that the test function answer well relatively 
to the remove function (and we have to go 2 times
through all the bindings).

Do you want that I fix your fix of my fix?
I imagine that you prefer to do it.
Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 6 Oct 2000 13:05:19 +0200

On Fri, Oct 06, 2000 at 08:28:05AM +0200, Olivier Chapuis wrote:
> add the second one).

Hm, yes.  Then there should be another version of MatchBinding()
that does exactly the same test as RemoveMatchingBinding().

> It seems to me that the better way to remove a binding is to use
> a libs  function which try to remove it using an _exact test_ 
> and then answer the removed bindings if the binding is removed
> and null if not (so that the caller can do things with the
> removed bindings). I do not understand why you do not like this
> solution (I am  not a professional of concrete programmation).

I dislike it because it allocates memory and forces the caller
to know the exact implementation to delete the returned binding.
Furthermore the RemoveMatchingBinding() function may delete more
than one binding in the future (more than one may match if you
used the IgnoreModifiers command after creating the bindings).

> I imagine that you prefer to do it.

I'll give it a try.

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 6 Oct 2000 13:11:11 +0200

> this is no more possible.

Whoever does the fix, please test with fvwm-themes, most of Mouse bindings
are broken now (this is when I like backup bindings - in keyboard, menus).
To extract mouse bindings used in fvwm-themes, execute:

  fvwm-themes-config --expand-rc | grep '^Mouse'

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 6 Oct 2000 16:20:52 +0200

>   fvwm-themes-config --expand-rc | grep '^Mouse'

Mikhael, I can't test this right now, but I already applied the
patch.  I think Olivier pointed out the problem why the bindings
are broken - and it is already fixed.

Bye

Dominik ^_^  ^_^

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 7 Oct 2000 01:24:42 +0200

> are broken - and it is already fixed.

Yes, fixed, thanks.

Regards,
Mikhael.