Shouldn't OpenWindowedScreen() open inside a given window?

Linux specific forum
User avatar
Derlidio
User
User
Posts: 77
Joined: Fri Feb 27, 2004 9:19 pm
Location: SP - Brazil

Shouldn't OpenWindowedScreen() open inside a given window?

Post by Derlidio »

Yeepy...

Shouldn't OpenWindowedScreen() open inside a given window?
The piece of code that follows shows strange behavior when compiled under Linux OS. The Screen appears windowed, but outside the main window (stated at the OpenWindowedScreen() function). As usual, I tested the code under WinXP and it behaves OK (Screen opens inside the given window).

Code: Select all

If InitSprite() = 0
  MessageRequester("Error", "Can't initialize Sprites...", 0)
  End
EndIf

OpenWindow(0, 10, 10, 640, 480, #PB_Window_SystemMenu, "Test")
OpenWindowedScreen(WindowID(0), 0, 0, 320, 240, 0,0,0)

LoadSprite(0, "Whatever.bmp", 0)

Repeat

  E = WindowEvent()

  If E = #PB_Event_CloseWindow: Break: EndIf

  FlipBuffers()                        ; Flip for DoubleBuffering
  ClearScreen(0,0,0)                   ; CleanScreen, black

  x = WindowMouseX()                   ; Returns actual x pos of our mouse
  y = WindowMouseY()                   ; Returns actual y pos of our mouse

  DisplaySprite(0, x-SpriteWidth(0)/2, y-SpriteHeight(0)/2)

ForEver

CloseScreen()

End
Derlidio Siqueira
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Post by Christian »

Same problem in my case ...

regards,
christian
Fred
Administrator
Administrator
Posts: 16681
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes, this is an SDL limitation and I don't know yet how workaround it. It should of course be precised in the docs (I will add it).
Post Reply