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

Discuss GUI programming with the MUI Royale plugin here
Post Reply
User avatar
jPV
Posts: 275
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

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

Post by jPV » 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

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

User avatar
airsoftsoftwair
Posts: 3121
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair » Mon Sep 09, 2019 5:51 pm

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.

User avatar
jPV
Posts: 275
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

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

Post by jPV » Mon Sep 09, 2019 6:36 pm

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...

User avatar
airsoftsoftwair
Posts: 3121
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair » Mon Sep 09, 2019 7:27 pm

Try to disable some 3rd party tools or extensions to see who is the culprit :)

Post Reply