Minimise with windowshape -- SOLUTION
Posted: Wed Jun 09, 2010 1:10 pm
There is a well known and long standing bug when minimising when a custom window shape is used.
Basically it does not work!
There is no problem if standard window decorations are used.
Searching the forum the accepted solution is as below:
In the mimimize button script:
on mouseup
set the windowshape of this stack to 0
set the iconic of this stack to true
end mouseup
In the stack script:
on unIconifyStack
set windowShape of me to <your background image id>
end unIconifyStack
However this also does not work correctly and on Win 7 will not show a preview in the taskbar popup.
WORKING SOLUTION tested on XP and Win7
A bit of lateral thinking.... As minimise works on a standard window, why not just set the minimise decoration prior to minimise?
So the script above becomes:
In the mimimize button script:
on mouseUp
--reset the windowshape to default and add a minimise button, required due to iconic command bug
set the decorations of this stack to "minimize"
set the iconic of this stack to true
end mouseUp
In the stack script:
In the stack script:
on unIconifyStack
-- revert to original window shape, doing so automatically removes the minimise decoration
set windowShape of me to <your background image id>
end unIconifyStack
Hope this helps.
Basically it does not work!
There is no problem if standard window decorations are used.
Searching the forum the accepted solution is as below:
In the mimimize button script:
on mouseup
set the windowshape of this stack to 0
set the iconic of this stack to true
end mouseup
In the stack script:
on unIconifyStack
set windowShape of me to <your background image id>
end unIconifyStack
However this also does not work correctly and on Win 7 will not show a preview in the taskbar popup.

A bit of lateral thinking.... As minimise works on a standard window, why not just set the minimise decoration prior to minimise?
So the script above becomes:
In the mimimize button script:
on mouseUp
--reset the windowshape to default and add a minimise button, required due to iconic command bug
set the decorations of this stack to "minimize"
set the iconic of this stack to true
end mouseUp
In the stack script:
In the stack script:
on unIconifyStack
-- revert to original window shape, doing so automatically removes the minimise decoration
set windowShape of me to <your background image id>
end unIconifyStack
Hope this helps.