[solved]How to exclude a special application for stroke

my code is:

Mouse 2 R N StrokeFunc DrawMotion Mouse 2 W N StrokeFunc DrawMotion Stroke N852 0 A A close
the stroke works at Root Window and every application Working Area with mouse middle button,
but I have a special 3D software(for example it named “mm”), it need middle button,I just want
stroke to work in most application´s working area but not in “mm”,
I tried,

Mouse 2 W N All (!mm) StrokeFunc DrawMotion Mouse 2 W All (!mm) N StrokeFunc DrawMotion All (!mm) Mouse 2 W N StrokeFunc DrawMotion
but they are all not work…

PS: Mouse 2 W N All (!mm) StrokeFunc DrawMotion made stroke crazy
does anyone have idea about that, How to exclude a special application for stroke,thanks!

You will need to use window mouse-bindings, and hope that this “mm” applications allows for synthetic key events. Hence you’re after this:

Mouse 2 W N StrokeFunc DrawMotion
Mouse (mm) 2 W N --

Which says that pressing mouse button 2on this “mm” window would pass the click to the application, and for everything else, invoke the DrawMotion action.

– Thomas Adam

Thanks Thomas!
I changed setting like you said,

Mouse 2 W N StrokeFunc DrawMotion Mouse (xxx) 2 W N --
ja, it is a way to block stroke in special application

it works for gedit and … , but unfortunately it is not work for “blender” and the 3d software “MM”,I guess ,as you were mention , that two 3d softwares not allows for synthetic key events :frowning:

then I tried to use windowId
WindowId (0x3000250) Mouse 2 W N –
0x3000250 was currently windowID of the 3dsoftware MM,
but it is still not work… :confused:

is that a only way to block stroke in special application? :confused:

In that case: No.

– Thomas Adam

Purely theoretically, couldn’t fvwmauto track cursor entering and leaving given window and trigger reading one of two files, enabling and disabling mouse 2 binding?

No, because the binding still has to be global for everything and excluding it for applications. It doesn’t matter which way round you do it, the fact of the matter is if the application can’t support synthetic events then this entire conversation is moot.

– Thomas Adam

The idea is not to exclude it for application, but, when mouse enters blender window, Read ~/.fvwm/bindings1, which would disable mouse2 binding globally, and as it leaves, Read ~/.fvwm/bindings2, enabling it globally.

I think i might write a dirty workaround for this, not sure about consequences, though. It would work with gimp, for example.

No, this won’t work reliably at all. There’s a reason why we have window bindings.

Seriously.

I wish people would listen.

– Thomas Adam

I checked and it does not work properly. Now I’m happy. )

You could have just taken my word for it. Thus saving me the need to continually re-affirm why I said window-bindings are the only way to go in the first place.

– Thomas Adam

I really do appreciate you talking to us noobs here (seriously) and I really am thankful to you for developing fvwm and running this forum, but I could not. I must have tried.

find a solution ,and I had post replied it in here,but it was deleted by someone,why? :open_mouth:

No idea – maybe it was never posted?

– Thomas Adam

ja, maybe you are right, post it again

there are two applications that I want to exclude it out of stroke,
one called “MM”,
another one is “blender”,
unfortunately both of them do not allow synthetic key events,
the mean

Mouse 2 W N StrokeFunc DrawMotion Mouse (MM) 2 W N StrokeFunc -- Mouse (blender) 2 W N StrokeFunc --can not block stroke of them,as Thomas said, that matter is the application can’t support synthetic events, I really think so, the matter is not from FVWM, but finally, it is the matter of FVWM user.

anyway, found a Clumsy solution:
(of course , it is not perfect, even looks stupid, but it works in this case :laughing: )

[code]Mouse 2 R N StrokeFunc DrawMotion
#Mouse 2 W N StrokeFunc DrawMotion
Mouse (a*) 2 W N StrokeFunc DrawMotion
###--------------------------------------------------------------------------------------------------
Mouse (c*) 2 W N StrokeFunc DrawMotion
Mouse (d*) 2 W N StrokeFunc DrawMotion
Mouse (e*) 2 W N StrokeFunc DrawMotion
Mouse (f*) 2 W N StrokeFunc DrawMotion
Mouse (g*) 2 W N StrokeFunc DrawMotion
Mouse (h*) 2 W N StrokeFunc DrawMotion
Mouse (i*) 2 W N StrokeFunc DrawMotion
Mouse (j*) 2 W N StrokeFunc DrawMotion
Mouse (k*) 2 W N StrokeFunc DrawMotion
Mouse (l*) 2 W N StrokeFunc DrawMotion
###--------------------------------------------------------------------------------------------------
Mouse (n*) 2 W N StrokeFunc DrawMotion
Mouse (o*) 2 W N StrokeFunc DrawMotion
Mouse (p*) 2 W N StrokeFunc DrawMotion
Mouse (q*) 2 W N StrokeFunc DrawMotion
Mouse (r*) 2 W N StrokeFunc DrawMotion
Mouse (s*) 2 W N StrokeFunc DrawMotion
Mouse (t*) 2 W N StrokeFunc DrawMotion
Mouse (u*) 2 W N StrokeFunc DrawMotion
Mouse (v*) 2 W N StrokeFunc DrawMotion
Mouse (w*) 2 W N StrokeFunc DrawMotion
Mouse (x*) 2 W N StrokeFunc DrawMotion
Mouse (y*) 2 W N StrokeFunc DrawMotion
Mouse (z*) 2 W N StrokeFunc DrawMotion

Mouse (A*) 2 W N StrokeFunc DrawMotion
###--------------------------------------------------------------------------------------------------
Mouse (C*) 2 W N StrokeFunc DrawMotion
Mouse (D*) 2 W N StrokeFunc DrawMotion
Mouse (E*) 2 W N StrokeFunc DrawMotion
Mouse (F*) 2 W N StrokeFunc DrawMotion
Mouse (G*) 2 W N StrokeFunc DrawMotion
Mouse (H*) 2 W N StrokeFunc DrawMotion
Mouse (I*) 2 W N StrokeFunc DrawMotion
Mouse (J*) 2 W N StrokeFunc DrawMotion
Mouse (K*) 2 W N StrokeFunc DrawMotion
Mouse (L*) 2 W N StrokeFunc DrawMotion
###--------------------------------------------------------------------------------------------------
Mouse (N*) 2 W N StrokeFunc DrawMotion
Mouse (O*) 2 W N StrokeFunc DrawMotion
Mouse (P*) 2 W N StrokeFunc DrawMotion
Mouse (Q*) 2 W N StrokeFunc DrawMotion
Mouse (R*) 2 W N StrokeFunc DrawMotion
Mouse (S*) 2 W N StrokeFunc DrawMotion
Mouse (T*) 2 W N StrokeFunc DrawMotion
Mouse (U*) 2 W N StrokeFunc DrawMotion
Mouse (V*) 2 W N StrokeFunc DrawMotion
Mouse (W*) 2 W N StrokeFunc DrawMotion
Mouse (X*) 2 W N StrokeFunc DrawMotion
Mouse (Y*) 2 W N StrokeFunc DrawMotion
Mouse (Z*) 2 W N StrokeFunc DrawMotion
##it is good, there are only 26 character in english :wink:

there are three application that I do not want to block it, but the first character of them name are “b”, fortunately they are all allow synthetic key events

Mouse (baobab) 2 W N StrokeFunc DrawMotion
Mouse (bleachbit) 2 W N StrokeFunc DrawMotion
Mouse (brasero) 2 W N StrokeFunc DrawMotion[/code]

thanks Thomas! without your Inspire, my FVWM setting sucks