empty window after mui-settings.

Discuss GUI programming with the MUI Royale plugin here
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: empty window after mui-settings.

Post by airsoftsoftwair »

SnoopDOS logs don't really help here. It would be interesting to know if anybody else has these problems...

Can some other OS4 users of MUI Royale try Examples/Class1.hws and check if the "SizeWindow" event works correctly on their systems? You just have to run the script, resize the window and see if the contents are correctly redrawn... as I said, everything works fine here.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: empty window after mui-settings.

Post by airsoftsoftwair »

Btw, is there anything special with your screen settings? Is compositing turned on or off? Are you using 16, 24 or 32bits? What system are you running OS4 on? Sam? X1000? Pegasos?
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Re: empty window after mui-settings.

Post by evil »

Andreas wrote:Btw, is there anything special with your screen settings? Is compositing turned on or off? Are you using 16, 24 or 32bits? What system are you running OS4 on? Sam? X1000? Pegasos?
Nothing special here!
My System is a MicroA1, 1GB of Ram, internal Radeon 7000. So no compositing!?
Resolution: 1280x1024x16
OS 4.1 Update 6 is running. Mui is installed in the actual Version MUI 4.0-2014R3.

Regards

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

Re: empty window after mui-settings.

Post by airsoftsoftwair »

I've just tried it in 16bit with compositing off but it's working fine. Are you on Hollywood 5.3 or 5.2 btw? Does resizing work in the VideoPlayer.hws or Anim.hws MUI Royale example? SizeWindow is used very often... it's really hard to imagine that it shouldn't work.
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Re: empty window after mui-settings.

Post by evil »

Andreas wrote:I've just tried it in 16bit with compositing off but it's working fine. Are you on Hollywood 5.3 or 5.2 btw? Does resizing work in the VideoPlayer.hws or Anim.hws MUI Royale example? SizeWindow is used very often... it's really hard to imagine that it shouldn't work.
The both programs scale to new size.
I've altered the script :

Code: Select all

	Case "SizeWindow":
p_doesntwork()
		If videoloaded = True
			SetVideoSize(1, msg.width, msg.height - 15)   ; adapt video to new window size
		EndIf

		p_MakeUI()   ; adapt buttons to new window size

		If videoloaded = True Then DisplayBrush(100, 0, 0, {Width = msg.width, Height = msg.height - 15})

I added the line "p_doesntwork()" directly after Case"Sizewindow".
As the function "p_doesntwork()" does not exist, the program should give me an error, when I resize the window.
But it doesn't. Seems, the Anims and Videos will be internally scaled.

Anything else, what might cause the problem?

I enabled and disabled Fakenativemodes and interrupt in devs/Monitors/Radeon 7000
I enabled and disabled Visual effects in Prefs/GUI

The following Programs are startet from within Prefs/WBStartup:
Amidock
AsyncWB
DefIcons
RAWBInfo
ClickToFront
RinghioServer
FilerCX
Mixer
FKey
LimpidClock

Any other Infos needed, which could help solving the problem??
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: empty window after mui-settings.

Post by airsoftsoftwair »

Er, you're modifying the wrong code. The MUI Royale video player is in MUIRoyale:Examples/Hollywood/VideoPlayer.hws. The code you posted is from the Hollywood VideoPlayer in Hollywood:Examples/VideoPlayer/VideoPlayer.hws. But the Hollywood VideoPlayer of course doesn't use MUI at all. Didn't you notice this? It really doesn't make any sense to modify Hollywood's example code and then complain about MUI Royale not working... please be more careful or it's a waste of time for both of us...
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Re: empty window after mui-settings.

Post by evil »

Oops.. Sorry!!

Now I tried theright one.
I entered:
mui.request("ok","super","ok")
directly underneath
Case "SizeWindow"

but no requester appears.

BTW: Is the Event "SizeWindow" only for mui-application? I thought, it should work with non-mui apps, too.

what about this little code-snipped:

Code: Select all

Function p_test()
	nprint ("super")
EndFunction

Installeventhandler ({SizeWindow=p_test})

repeat
	waitevent
forever
There should be printed the message "super" everytime, I resize the window, shouldn't it???
It does not...

When i change the eventhandling-line to

Code: Select all

Installeventhandler ({MoveWindow=p_test,SizeWindow=p_test})
the window gets full of supers, everytime I move the window...

So maybe, the problem is not in MUI-Royale, but in Hollywood itself??

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

Re: empty window after mui-settings.

Post by airsoftsoftwair »

I think I know what is wrong here. You probably have autoscaling or layerscaling enabled. In that case, there'll be no "SizeWindow" messages because they're eaten by the scaling engines. If you start your scripts from the Hollywood GUI, the scaling engines are often enabled automatically. Try to run your script from a shell instead. e.g. like this:

Code: Select all

1> Hollywood test.hws
Then it should work...
evil
Posts: 177
Joined: Mon Jun 14, 2010 1:38 pm

Re: empty window after mui-settings.

Post by evil »

Yes! Now it works here, too!

But this makes another Prolblem:
As I mentioned, the window is borderless, so it is not resizeable by the user.
When the mui-config-window is opened, and the user selects a screenresolution smaller than the actual screen, then the sizewindow event will trigger.
On the other hand, when a resolution greater than the actual screenresolution is selected, the sizewindow-event will of course not be triggered, as the window still fits on the screen.
That means, if the user switches through different screens, and there is at least one, which is smaller, the window will never be resized to a bigger resolution afterwards.

I thought, I might use wndow.pubscreen, to get the size from the actual used public screen from time to time and, if needed, resize the display to that size.
But I am not able to get the actual pubscreenname! I only get the pubscreen name, when I initialize it in the xml-script.
Is there any way to get the pubscreenname or its dimensions???

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

Re: empty window after mui-settings.

Post by airsoftsoftwair »

Well, the reason why Window.PubScreen is empty is that it will only return something if you've set it before. It does *not* return the screen the window is currently on but the name of the public screen that has been specified to override the user preferences. As you didn't do that, Window.PubScreen is empty. This is correct behaviour of MUI Royale.

I see however that MUI Royale is currently lacking a method of finding out the name of the public screen a specific MUI window is currently on. I think I'll adapt MUIA_Window_Screen for that purpose for the next MUI Royale update. Then you can do a mui.Get("window", "screen") to get the name of the window's screen in any case.

That being said, it's a very bad idea to constantly poll the name of the window's current screen and wait for something to change. Unfortunately, MUI 3.x doesn't allow the application be notified about configuration changes, but MUI 4 supports this so I think I can support a notification mechanism in MUI Royale too. Of course this will only work if MUI 4 is installed. In that case it should be possible to implement a notification mechanism that triggers whenever the user changes the MUI preferences for your app. This should solve your problems...
Post Reply