OpenWindowedScreen() doesn't work

Linux specific forum
Froggerprogger
Enthusiast
Enthusiast
Posts: 423
Joined: Fri Apr 25, 2003 5:22 pm
Contact:

OpenWindowedScreen() doesn't work

Post 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 ?
%1>>1+1*1/1-1!1|1&1<<$1=1
MadMax
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Oct 06, 2003 11:56 am

Post by MadMax »

Yeah seems that in linux behaviour is different from windows, just forget the OpenWindow part.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post 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.
Froggerprogger
Enthusiast
Enthusiast
Posts: 423
Joined: Fri Apr 25, 2003 5:22 pm
Contact:

Post 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...)
%1>>1+1*1/1-1!1|1&1<<$1=1
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post 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.
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post 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?
bye,
Daniel
Froggerprogger
Enthusiast
Enthusiast
Posts: 423
Joined: Fri Apr 25, 2003 5:22 pm
Contact:

Post 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: )
%1>>1+1*1/1-1!1|1&1<<$1=1
Post Reply