Page 1 of 1

SizeWindow event not occure

Posted: Sat Dec 31, 2016 10:43 am
by lazi
I want to notified on a rapagui window resize event. When there is two hollywood display is present there it does not send sizewindow events.
While only one display in one windows it works.

I hope this is a bug, and not some limitation because I need a fixed and a variable size hollywood display in the window.

Edit:
It is OS4whateverlatest. Sometimes I got en event, but mostly not.

Code: Select all

@REQUIRE "RapaGUI"
@DISPLAY 1,{Width = 320, Height = 200, color=#RED}
@DISPLAY 2,{width = 320, Height = 32, color=#GREEN}

gui$=[[<?xml version="1.0" encoding="iso-8859-1"?>
		<application id="app">
		<window title="Slarti V1.0 beta 1" activate="true">
			<vgroup>
				<hgroup>
					<hollywood id="hws" display="1"  hide="false" fixwidth="false" fixheight="false"/>
					<hollywood id="timeline" display="2" hide="false" fixwidth="false" fixheight="false"/>
				</hgroup>

			</vgroup>
		</window>
        </application>
	 ]]

Function p_resizewindow(msg)
		DebugPrint("^^^^^^^^^^^^^^^^^^^^^")
		DebugPrint("class:",msg.action)
		DebugPrint("attribute:",msg.id)
		DebugPrint("size:",msg.width,msg.height)
		DebugPrint("-----------------------")
EndFunction

moai.CreateApp(gui$)

InstallEventHandler({SizeWindow=p_resizewindow})

Repeat
   WaitEvent
Forever

Re: SizeWindow event not occure

Posted: Tue Jan 03, 2017 9:43 pm
by airsoftsoftwair
Yes, this looks like a bug. Will be fixed, thanks for the report!

Re: SizeWindow event not occure

Posted: Sun Mar 26, 2017 6:50 pm
by airsoftsoftwair
Actually, there is a bug in your script but also in Hollywood :) Display event handlers need to be installed individually for each display, so you'd have to do something like this:

Code: Select all

SelectDisplay(1)
InstallEventHandler({SizeWindow=p_resizewindow})
SelectDisplay(2)
InstallEventHandler({SizeWindow=p_resizewindow})
Unfortunately, this will only get you one SizeWindow event handler because of a bug in Hollywood. But that's fixed now, unfortunately a little too late for Hollywood 7.0 :-)