Creating a border-less window OR render to desktop?

Started by Liquidream, October 21, 2004, 06:15:44

Previous topic - Next topic

Liquidream

Hi all (Noob alert!)  :cry: ,

IDEALLY I would like to (somehow) make an app/game that renders its graphics to the Windows desktop (e.g. where the Icons and Background are, but behind all other windows - effectively replacing the current Windows desktop).

From searching around, it seems that this may not be possible, so if not, could anyone give me some help in how I could create a border-less window so I could make it the size of my desktop, and possibly acheive the same result?

I don't want it running in a "Fullscreen" mode, as I want to allow the task bar (at the bottom) to remain, and any open windows to appear in-front of my app/game.

Any help on this would be great, thanx!!!  :D   :D

Paul.

Matzon

You can create a borderless window using the hidden boolean property org.lwjgl.opengl.Window.undecorated.
Just pass -Dorg.lwjgl.opengl.Window.undecorated=true when executing your app.

Other than that, you would need to modify lwjgl to suit your needs

/me makes a mental note: document hidden switches

Liquidream

Thanks, I'll give that one a go....  :)

Any suggestions on how I can set the window size of my app to the current desktop size?  :?  Seems from looking at a different post that "Windowed" mode is not very well supported (in terms of Maximizing, Setting window "Z" order, etc), has this improved now?

Thanks in advance!  :D

Liquidream

OK, I've sussed this part out myself and set it to the desktop resolution, but...

...does anyone know (couldnt find anything on forums) how to set the window position to the back (like "Send to Back") and to keep it there.  The behaviour I want to have is that my application should always be the "farthest back" window, and that when I click on it - for it to register my mouse events BUT _not_ to bring itself infront of windows, just to stay at the back.  

Is this possible?  :?

Many thanx for any help!!  :)

Matzon

No, this is not possible. You will have to modify lwjgl to suit your needs then. Need to fix the z order when creating the window - no idea how you do it on linux/mac though

Liquidream

OK thanks! I'll have a play :)

(BTW: I'm using Windows as a target platform for this)

Liquidream

Well...  I've been looking at the LWJGL source code (v0.92) and I'm not sure which bit actually "creates" the Window.  I thought it might be the "display.cpp" in native\win32 (note I am dev'ing for Win32 only).

I had a look on the Net for creating Windows with the lowest Z-ordering (e.g. to always be behind other windows) and I found many references to to following C++ call which I was hoping to find in the LWJGL source (as it's also C++!):
BOOL SetWindowPos(hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags)

QuoteHWND_BOTTOM Places the window at the bottom of the Z-order. If hwnd identifies a topmost window, the window loses its topmost status; the system places the window at the bottom of all other windows.

But this function isn't being called in LWJGL source (as far as I can tell).

Would anyone be able to show me how I can modify the LWJGL source to allow a window to be created with the Z-Order set to "Bottom of the pile"?  I would really appreciate it - once I can suss this part out - I can get back to Java coding the actual program!  :roll:

Thanks very much for any help on this!  :)

elias4444

QuoteYou can create a borderless window using the hidden boolean property org.lwjgl.opengl.Window.undecorated.
Just pass -Dorg.lwjgl.opengl.Window.undecorated=true when executing your app.

So, how do you get this to work within jnlp? Works great with applications, but I can't seem to get it to take when I put it in my jnlp file.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

elias4444

Well, I used System.setProperty to get it to work. Although I'm wondering if that's the best way.  :?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

willdenniss

Quote from: "elias4444"
QuoteYou can create a borderless window using the hidden boolean property org.lwjgl.opengl.Window.undecorated.
Just pass -Dorg.lwjgl.opengl.Window.undecorated=true when executing your app.

So, how do you get this to work within jnlp? Works great with applications, but I can't seem to get it to take when I put it in my jnlp file.

Easy:

http://lopica.sourceforge.net/faq.html#magic-props

Will.