Page 1 of 1

OpenWindowedScreen() doesn't work

Posted: Thu Feb 22, 2007 12:43 am
by Froggerprogger
Running the following code

Code: Select all

OpenWindow(0, 0, 0, 600, 400, "Test")
OpenWindowedScreen(WindowID(0), 0, 0, 1024, 768, 1, 0, 0)

While WindowEvent() <> #PB_Event_CloseWindow
  StartDrawing(ScreenOutput())
    Box(Random(1000), Random(1000), Random(1000), Random(1000), Random($7FFFFFFF))
  StopDrawing()
  FlipBuffers()
  Delay(10)
Wend
under Ubuntu 6.10 with Linux-PB 4.0 Beta 3 creates a window named "Test" without any content of size 600, 400, and another seperate one of size 1024x768 without a title where the drawings are made to.
Running the examples from the help for OpenWindowedScreen has the same behaviour.
I have all the recommended libs installed via aptitude as mentioned here: http://www.purebasic.fr/english/viewtopic.php?t=23622

Anybody an idea, or can confirm ?

Posted: Thu Feb 22, 2007 1:57 am
by MadMax
Yeah seems that in linux behaviour is different from windows, just forget the OpenWindow part.

Posted: Thu Feb 22, 2007 4:40 am
by dracflamloc
Its a SDL thing. You can just compilerif the openwindow, and use SDL api to set the title of your screen.

It does stink because it will limit your use of gadgets etc.

If sprite3d has been finished on linux then you should be able to embed sprite3d screen into a normal linux window.

Posted: Thu Feb 22, 2007 10:39 am
by Froggerprogger
thank you both

I will go deeper into SDL, GTK and Linux/Ubuntu now.
(It's a kind of sea and I am a submarine...)

Posted: Thu Feb 22, 2007 2:40 pm
by dracflamloc
No prob. Hope you have lots of oxygen :lol:

Seriously though, once you're used to the *nix style of creating windows and stuff you see how kludgy both win32 and nix X windows really are. Both are quite antiquated and would benefit from an overhaul. Sadly that basically won't happen, but at least theres stuff like GTK and WxWindows.

Posted: Thu Feb 22, 2007 2:44 pm
by DarkDragon
Froggerprogger: Your native language is German, isn't it? :lol:

http://www.purebasic.fr/german/viewtopi ... owedscreen

Btw.: Do you want to port your QBPlay for us to PB 4.x?

Posted: Thu Feb 22, 2007 5:29 pm
by Froggerprogger
@DarkDragon
Whoops!

OT: QBPlay will be ported do PB 4.x (Win&Linux) and enhanced by further sounds, better multi-tracking and more complex sound-creations (using regexps), and by a a MIDI to QBPlay-converter... as soon as I have the time therefore (hopefully this year :roll: )