Closing a button

I’m have a button that pops up a menu when right clicked. In that menu I have an exit function.

  • “Exit” Close

When I click on exit, it brings up the close cursor and asks me to click on a window that I want to close. I want it to close the FvwmFoo.

  • I Module FvwmButtons -g 55x55-75-0 FvwmFoo.

Any ideas?

So you want to be able to close a window by clicking on it, right?

Unless I misunderstood you this should work:

+ "Exit" Pick Close

I don’t want to be able to close via clicking. It’s closing by clicking right now. I want it to close the button FvwmFoo upon the menu selection.

I should read what I’m about to post before postings. Sorry

So you want to close an FvwmButtons instance? As far as I know they have a title just like other windows so you could use that in cojunction with one of the conditional commands (I thing you need ‘Any’)



All (CurrentDesk, !Transient, AcceptsFocus) ThisWindow ("name_of_window") Close

– Thomas Adam

It’s still asking me which window to close. I’m probably doing something wrong, so here’s the config:

DestroyMenu MenuFvwmFoo
AddToMenu MenuFvwmFoo

  • “Exit” Close

*FvwmFoo: (1x1, Frame 0, Action (Mouse 3) Menu MenuFvwmFoo window c -100m, Swallow “Fvwm-Foo” ‘FvwmScript scripts/Foo 90’)

DestroyFunc FvwmFoo
AddToFunc FvwmFoo

  • I All (CurrentDesk, !Transient, AcceptsFocus) ThisWindow (“FvwmFoo”) Close

You have to call that function from your menu entry of course…

+ "Exit" FvwmFoo