SizeWindow event not occure

Discuss GUI programming with the RapaGUI plugin here
Post Reply
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

SizeWindow event not occure

Post 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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SizeWindow event not occure

Post by airsoftsoftwair »

Yes, this looks like a bug. Will be fixed, thanks for the report!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SizeWindow event not occure

Post 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 :-)
Post Reply