Marcus Lundblad <[EMAIL PROTECTED]> writes: > > > On Sat, 14 Dec 2002, Dan Espen wrote: > > > Marcus Lundblad <[EMAIL PROTECTED]> writes: > > > I'm implementing new styles to control allowed operations on windows. > > > Looked at the code in decorations.c (is_function_allowed) I see that the > > > MWM hint Close disables both Close and Destroy. > > > So I'm not quite sure what is the best thing to do: Follow this behavoiur > > > with the new style, implement an additional style or always permit > > > Destroy, > > > There is also a comment in the code: > > > /* shouldn't destroy always be allowed?? */ > > > > > > Maybe that should be so, Destroy should always be possible. > > > Thought I would want to hear som opinions. > > > > Destroy is still possible, thru keybindings, mousebindings, > > and root context menus. > > Is Destroy handled specifically when it's used? > As far as I can see the code in is_function_allowed is the same for > Close and Destroy: > > case F_CLOSE: > if (IS_TEAR_OFF_MENU(t)) > { > /* always allow this on tear off menus */ > break; > } > if (!(functions & MWM_FUNC_CLOSE)) > { > return False; > } > break; > case F_DESTROY: /* shouldn't destroy always be allowed??? */ > if (IS_TEAR_OFF_MENU(t)) > { > /* always allow this on tear off menus */ > break; > } > if (!(functions & MWM_FUNC_CLOSE)) > { > return False; > } > break; > > If I've not missed anything (have got an hangover today... ^^ ), this > could be written as: > > case F_CLOSE: > case F_DESTROY: > if (IS_TEAR_OFF_MENU(t)) > { > /* always allow this on tear off menus */ > break; > } > if (!(functions & MWM_FUNC_CLOSE)) > { > return False; > } > break;
Hmm, hangover, I'LL TRY NOT TO SHOUT! Yep, its the same. > Also I'm thinking about wether Style Unclosable should apply also for > tear-off menus. > The argument in favour: The user has requested this > expliciltly through a style > The arguments against: It is incosistent with how hints are handled and > there is no other way to close it (what does destroy do on a tear-off, > kill fvwm?). It only takes a second to try it. (No it doesn't kill Fvwm.) I don't know why we would need a Style Unclosable. We have more direct methods of removing the close button from a titlebar. (I know it affect context menus too.) I think the idea of the MWM hint, is that applications that didn't implement the delete window protocol would set the hint. This was to encourage the user to use other means to close the window, perhaps the file->close menu entry. It all seems pretty pointless anyway, Fvwm can still apply close/delete to the window. I always thought it was more for appearance. -- Dan Espen E-mail: [EMAIL PROTECTED] -- 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 PROTECTED] To report problems, send mail to [EMAIL PROTECTED]