Page 1 of 1

Menu and iconify window under Windows

Posted: Fri Dec 25, 2015 5:31 pm
by Juan Carlos
This problem I spoke about it, now here is the example, when you use the menu and iconify the window the second or third time the content, for example one or several brushes disappear, again you try to show the brush iconify the window but the problem continues.

Code: Select all

@BRUSH 300, "Amiga500.jpg", {Loader="inbuilt"} ;Here you can test with other picture.
@MENU 1,
{
    {"Menu Test",
      {
	{"Empezar...", ID = "start"},
	{"Parar...", ID = "stop", Flags = #MENUITEM_DISABLED},
	{""},
	{"Salir...", ID = "quit", Hotkey = "ESC"}
      }
    },
    {"?",
	{
	{"Sobre..", ID = "about"}
	}
    }
}
@DISPLAY {Title="Example Menu Bug ", Width=320, Height=208, Color=#WHITE, Borderless = False, NoClose=False,
	 KeepProportions=True, Sizeable = False, NoModeSwitch=True, Menu=1
}
Function p_MenuFunc(msg)
	Switch msg.action
	    Case "OnMenuSelect":
		Local r$ = ""
		Local doreq = True
		Switch msg.item
			Case "start":
				doreq = False

			Case "stop":
				doreq = False

			Case "start":
				doreq = False

			Case "about":
				doreq = False

			Case "quit":
				End()

			Default:
				r$ = msg.item
		EndSwitch
		If doreq
			If r$ = "" Then r$ = "Requester cancelled"
			SystemRequest("", "Your selection: " .. r$, "OK", #REQICON_INFORMATION)                                                 
		EndIf
	EndSwitch
EndFunction

DisplayBrush(300, 0, 0)

InstallEventHandler({OnMenuSelect = p_MenuFunc})

EscapeQuit(True)
Repeat
  WaitEvent
Forever
You can test the problem with your brush the problem is for jpg, etc., the pictures brushes soemtimes with text strings too.

Re: Menu and iconify window under Windows

Posted: Mon Dec 28, 2015 10:54 pm
by airsoftsoftwair
Right, seems to be a bug. I'll fix this. Thanks for reporting.

Re: Menu and iconify window under Windows

Posted: Tue Dec 29, 2015 4:54 pm
by Juan Carlos
Sometimes under MorphOS the bug appear but it is more difficult replay it, only with the VAMP, but is very much code to try find the bug in this moment.

Re: Menu and iconify window under Windows

Posted: Mon Feb 22, 2016 7:25 pm
by airsoftsoftwair
Fixed.

Re: Menu and iconify window under Windows

Posted: Wed Feb 24, 2016 7:30 am
by Juan Carlos
Thanks, and good job.