On 02 Mar 2002 08:37:25 +0100, Dominik Vogt wrote: > > On Fri, Mar 01, 2002 at 05:56:35PM -0600, fvwm-bug wrote: > > > > new message incoming/859 > > Full_Name: Neil Zanella > > > > It would be nice if there were a configuration option called > > ResizeUnshades. > > What this option would oo is the following: if a window is resized when > > it is shaded then it would become unshaded. > > It's easy to do without a new option: > > AddToFunc ResizeUnshade > + I WindowShade off > + I Resize > > You may want to disable the shading animation first.
I wanted to test new contexts, so I tried to "improve" my existing: DestroyFunc ResizeOrRaiseOrShade AddToFunc ResizeOrRaiseOrShade + H Resize + M Resize + C Raise + D WindowShade Mouse 1 SF A ResizeOrRaiseOrShade Here is the result: DestroyFunc UnshadeResize AddToFunc UnshadeResize + I WindowShade off + I Resize DestroyFunc ResizeOrRaiseOrShade AddToFunc ResizeOrRaiseOrShade + H UnshadeResize + M UnshadeResize + C Raise + D WindowShade DestroyFunc ResizeOrRaiseOrShade2 AddToFunc ResizeOrRaiseOrShade2 + I This (Shaded) CursorMove 0 $[cw.height]p + I ResizeOrRaiseOrShade Mouse 1 SF A ResizeOrRaiseOrShade Mouse 1 v_> A ResizeOrRaiseOrShade2 Works nicely, this in addition automatically moves cursor when needed. BTW, $[cw.height] was buggy before yesterday, but it is correct now. Please run this code, so you may understand what I am speaking about. ---------------------------------------------------------------------- Now, something less good. I want to replace UnshadeResize and this does not work: DestroyFunc UnshadeResize AddToFunc UnshadeResize + I This (Shaded) WindowShade off + I Resize + I Cond (Match) WindowShade on Apparently Cond looses the operand window, so when the original window was shaded this prompts for a new window. And if you cancel Resize using mouse 2, this either beeps if the cursor is outside of the window on button release, or shades another window with cursor, or (if the cursor is inside) the button release acknowledges picking a window. All situations do not seem something one would expect. But this problem is not relevant here, let first see what happens when Resize is not canceled. ---------------------------------------------------------------------- And here are examples when Preserve (or PreserveStatus) would be useful (I use my proposed solution about all commands returning status codes): # restore shaded windows after resize DestroyFunc UnshadeResize AddToFunc UnshadeResize + I This (Shaded) WindowShade off + I PreserveStatus Resize + I On (Success) WindowShade on # restore cursor at the bottom of window border DestroyFunc ResizeOrRaiseOrShade2 AddToFunc ResizeOrRaiseOrShade2 + I This (Shaded) CursorMove 0 $[cw.height]p + I PreserveStatus ResizeOrRaiseOrShade + I On (Success) CursorMove 0 -$[cw.height]p The "On (Success)" is only true when This matched. Do I understand it right that with the current code (that does not work, because operand window is lost), the only way is this function since ResizeOrRaiseOrShade by itself contains functions with conditionals: DestroyFunc ResizeOrRaiseOrShade2 AddToFunc ResizeOrRaiseOrShade2 + I This (Shaded) CursorMove 0 $[cw.height]p + I CondCase (Match) ResizeOrRaiseOrShade + I CondCase (Error) ResizeOrRaiseOrShade # for completeness + I CondCase (NoMatch) ResizeOrRaiseOrShade + I Cond (Match) CursorMove 0 -$[cw.height]p # or CondCase Regards, Mikhael. -- 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]