Prevent from destroying windows

Hi there!

I don’t know, if it’s fvwm-behaviour, or misconfiguration in my config…

A klick on titlebar-button 2 (the one on the rightest right) closes the window.
A double-klich on this button destroys this window and starts xkill (the mouse-cursor is the skull…)
And it doesn’t matter if it is mousebutton 1, 2, 3 or 4 or even 5.

I want to stop this behaviour on mousbuttons 4 and 6 (the wheel). In my config, i couldn’t find any hint for that, so i think its buildin.

Therefore I tried this

[code]Mouse 4 2 N NopFunc
Mouse 5 2 N NopFunc

DestroyFunc NopFunc
AddToFunc NopFunc

  • I Nop
  • D Nop
  • C Nop
  • H Nop
  • M Nop
    [/code]

But it didn’t help…

Any ideas?

scientific

As I remember you’re using (or has used) a modified version of Fvwm-Nightshade. If so this behaviour is located in each decor file of the themes:

[code]# Close button (2)

Every button close window <- click

Mouse 0 2 A FuncDeleteOrDestroy[/code]
In the config you find the appropriated function]#-----------------------------------------------------------------------

delete a window (single click) or destroy it (double click)

#-----------------------------------------------------------------------
DestroyFunc FuncDeleteOrDestroy
AddToFunc FuncDeleteOrDestroy

  • H Nop
  • M Nop
  • C Delete
  • D Destroy
    [/code]
    Possible Conclusions:
  • remove [code]
  • D Destroy
    [/code]from function => no destroy anymore on all mouse buttons
  • split the function in two[code]#-----------------------------------------------------------------------

delete a window (single click)

#-----------------------------------------------------------------------
DestroyFunc FuncDelete
AddToFunc FuncDelete

  • H Nop
  • M Nop
  • C Delete

#-----------------------------------------------------------------------

destroy a window (double click)

#-----------------------------------------------------------------------
DestroyFunc FuncDestroy
AddToFunc FuncDestroy

  • H Nop
  • M Nop
  • D Destroy
    [/code]
    And remove in each decor file the mouse binding and exchange it with[code]# Close button (2)

Every button close window <- click

Mouse 0 2 A FuncDelete

Close button (2)

button 1 destroy window <- double click

Mouse 1 2 A FuncDestroy[/code]Now only on mouse button 1 the destroy exist. For more mouse buttons replicate the line with different mouse buttons.

– Thomas –

Hmm… This sounds good. But it isn’t the solution.
A grep on my configs für fvwm gave me only the Function, but no use of this function anywhere… I modified this function “Nop” also on “C” and “D”… no change of behaviour…

I’m still searching…

You know that FNS have two locations where it searches for configs?
First on $FVWM_USERDIR and then whether it’s not there on $FNS_SYSTEMDIR.

How have you do that? Changing it only in FvwmConsole doesn’t work. You’ve to put it in a file e.g. $FVWM_USERDIR/testem and import it newly with ‘read testem’ from within FvwmConsole.

As I said before the binding is in the decor files of each theme:
$FVWM_USERDIR/themes/Air/decor and $FNS_SYSTEMDIR/themes/Air/decor

What happens if you execucte ‘FuncRemoveAllButtonBindings’ in FvwmConsole?

– Thomas –

Nothing… The also gets destroyed on single-click and xkill is called on double-click. Also all menus are still there…

scientific

I’ve downloaded your verve package and looked into it. Ok, now I understand why ‘FuncRemoveAllButtonBindings’ not working - it’s not available :confused:
Your config is heavy different to FNS, so you can forget most of what I’ve wrote earlier.

Anyway … back to your problem … the function you’ve searching for is DestroyOnHold in script 04_wm-funcs.fvwm.

You bind it to mouse clicks on different places:

  1. in themes/cooljakob/bindings.fvwm. Here it is bind to Mouse 0 which is a synonym for all mouse buttons]Mouse 0 2 A DestroyOnHold
    [/code]2. in keys_mouse.fvwm. Here you bind it to mouse 1 which overwrites your mouse binding before]Mouse 1 2 A Delete
    Mouse 1 2 A DestroyOnHold[/code]
    I hope this helps to solve your problem.

– Thomas –

THX!!!
That was it!

:smiley:

scientific