Problems moving displays....
Posted: Tue Apr 03, 2012 12:08 am
Hi!
I've areally weird problem on that example code:
The problems was:
- Why the DebugPrin() function was triggered imediately but the move functions that moves windows not? Maybe the system(AmigaOS4.x here) cant move more than one window at a time?
- Whty the only function that works as expected was he ChangeDisplaySize() function? That was the uglyest and less appropriate for doing was I want to do since every time it moves/chanche also the size and so the display flashes...
Have I made some weird mistake?
Also...Why when we have to move/change a display we have to call such ugly looking for code reading SelectDisplay() function avery time? Wasnt easyest and more clean to have a function like:
SetDisplayAttributes(id , talbe)
Any problem doing that?
Probably I miss somthing...
That's all, thank you for reading!
I've areally weird problem on that example code:
Code: Select all
@DISPLAY 1, {Title = "Display 1", Width = 640, Height = 512, X = 300, Y = 300}
@DISPLAY 2, {Title = "Display 2",Width = 200, Height = 100, X = 0, Y = 0}
@DISPLAY 3, {Title = "Display 3",Width = 300, Height = 50, X = 305, Y = 0}
@DISPLAY 4, {Title = "Display 4",Width = 200, Height = 200, X = 0, Y = 250}
Function p_MoveWindow(msg)
SelectDisplay(2, TRUE)
MoveDisplay(msg.x - 100, msg.y - 100)
SelectDisplay(1, TRUE)
SelectDisplay(3, TRUE)
SetDisplayAttributes({X = msg.x - 100, Y = msg.y + 100})
SelectDisplay(1, TRUE)
SelectDisplay(4, TRUE)
ChangeDisplaySize(200, 200, {X = msg.x -200, Y = msg.y + 300})
SelectDisplay(1, TRUE)
DebugPrint(msg.x, msg.y)
EndFunction
InstallEventHandler({MoveWindow = p_MoveWindow})
Repeat
WaitEvent
Forever- Why the DebugPrin() function was triggered imediately but the move functions that moves windows not? Maybe the system(AmigaOS4.x here) cant move more than one window at a time?
- Whty the only function that works as expected was he ChangeDisplaySize() function? That was the uglyest and less appropriate for doing was I want to do since every time it moves/chanche also the size and so the display flashes...
Have I made some weird mistake?
Also...Why when we have to move/change a display we have to call such ugly looking for code reading SelectDisplay() function avery time? Wasnt easyest and more clean to have a function like:
SetDisplayAttributes(id , talbe)
Any problem doing that?
Probably I miss somthing...
That's all, thank you for reading!