Iconifying via HideWindow event doesn't allow uniconify by double clicking the app icon
Posted: Tue Sep 03, 2019 7:26 pm
If I use the Exchange program to iconify this kind of program, I can't uniconify it by double clicking the app icon. I can uniconify by Exchange, or if I hide the program twice with Exchange, then it uniconifies by double-clicking... or if I have some events happening within the Hollywood script, then it uniconifies when an event occurs. So, the double click is taken, but it uniconifies only after the next event kicks in, but not immediately. This happens at least on MorphOS, but can't remember now if it happens elsewhere...
More info in this thread too: viewtopic.php?p=11942#p11942
More info in this thread too: viewtopic.php?p=11942#p11942
Code: Select all
@APPTITLE "Hide me!"
@APPDESCRIPTION "...and then double-click my icon."
@DISPLAY {Hidden = True}
Function p_EventFunc(msg)
End
EndFunction
Function p_Iconify(msg)
If msg.action="HideWindow"
mui.Set("app", "iconified", True)
Else
mui.Set("app", "iconified", False)
EndIf
EndFunction
gui$=[[
<?xml version="1.0" encoding="iso-8859-1"?>
<application base="HELLOWORLD" id="app">
<window title="Example GUI" muiid="MAIN" notify="closerequest" width="Visible:10">
<vgroup>
<text>bla</text>
</vgroup>
</window>
</application>
]]
mui.CreateGUI(gui$)
InstallEventHandler({MUIRoyale = p_EventFunc, ShowWindow=p_Iconify, HideWindow=p_Iconify})
; SetInterval(1, Function() EndFunction, 500) ; Enable this line to have a work-around.
Repeat
WaitEvent
Forever