Page 1 of 1

Iconifying via HideWindow event doesn't allow uniconify by double clicking the app icon

Posted: Tue Sep 03, 2019 7:26 pm
by jPV
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

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

Re: Iconifying via HideWindow event doesn't allow uniconify by double clicking the app icon

Posted: Mon Sep 09, 2019 5:51 pm
by airsoftsoftwair
Are you on a beta version of MorphOS? I can't reproduce this with MorphOS 3.11. It also works fine on OS4 and OS3.

Re: Iconifying via HideWindow event doesn't allow uniconify by double clicking the app icon

Posted: Mon Sep 09, 2019 6:36 pm
by jPV
Hmpf... seems that something in my installed system triggers it. I tried to boot from live ISO image and it doesn't happen there, it's not about MorphOS versions. And I noticed one more detail on my installed system, if I have rebooted the machine, then it works with the very first try, but if I iconify it again via Exchange, it stops working at that point. And then it never does work again even if I quit and restart the program... weird...

Re: Iconifying via HideWindow event doesn't allow uniconify by double clicking the app icon

Posted: Mon Sep 09, 2019 7:27 pm
by airsoftsoftwair
Try to disable some 3rd party tools or extensions to see who is the culprit :)