X root window

Is it possible to draw to the root window in X?

If so how?

If not why not and can it be made to do so (via a patch)?

Thanks
Samuel–
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety. "
–Benjamin Franklin

well…im sure it is possible to draw to the root window in X, but through
SDL it is not.

You cant draw to the root X window, or to the windows desktop or to the mac
desktop etc.

it would be neat if there was a way to do this across the platforms, but it
gets wierd when your on a platform that doesnt have a desktop which is why
im sure it isnt part of SDL.

since SDL is just open sourced code, yes it is possible through a patch to
make SDL be able to draw to the root window in X. Heck, itd be possible to
make SDL reformat your hard drive or overclock your CPU’s on SDL_Init…the
world is your oyster if you want to change and recompile. I am unaware of
any such patch though :stuck_out_tongue:

hope this helps
-Atrix> ----- Original Message -----

From: taxtropel_news@yahoo.com (Samuel E. Bray)
To:
Sent: Sunday, April 13, 2003 7:35 PM
Subject: [SDL] X root window

Is it possible to draw to the root window in X?

If so how?

If not why not and can it be made to do so (via a patch)?

Thanks
Samuel


"They that can give up essential liberty to obtain a little temporary
safety
deserve neither liberty nor safety. "
–Benjamin Franklin


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Actually, it IS possible to draw to the desktop in a windows
environment. It’s one of the few things I did when I started fooling
around with the GDI… You just need to get the handle of the desktop(which
is done by calling the GetDC() win32 API function. It takes only one
parameter, which is the handle of the window; to get the DC of the
desktop, just call it with NULL as your parameter. You will then have a
device context to write to using the Win32 GDI.----------------------------------------------------------------------

Protect your PC - Click here for McAfee.com VirusScan Online

i was just saying it wasnt possible via SDL alone----- Original Message -----
From: Jean-Charles Frenette
To: sdl at libsdl.org
Sent: Monday, April 14, 2003 1:40 PM
Subject: Re: Re: [SDL] X root window

Actually, it IS possible to draw to the desktop in a windows environment. It’s one of the few things I did when I started fooling around with the GDI… You just need to get the handle of the desktop(which is done by calling the GetDC() win32 API function. It takes only one parameter, which is the handle of the window; to get the DC of the desktop, just call it with NULL as your parameter. You will then have a device context to write to using the Win32 GDI.


Protect your PC - Click here for McAfee.com VirusScan Online _______________________________________________ SDL mailing list SDL at libsdl.org http://www.libsdl.org/mailman/listinfo/sdl

Actually, it *IS* possible to draw to the desktop in a windows environment. It's one of the few things I did when I started fooling around with the GDI.. You just need to get the handle of the desktop(which is done by calling the GetDC() win32 API function. It takes only one parameter, which is the handle of the window; to get the DC of the desktop, just call it with NULL as your parameter. You will then have a device context to write to using the Win32 GDI.


Protect your PC - Click here for McAfee.com VirusScan Online

You can also do it in X, by setting the SDL_WINDOWID environment variable
to the window id of the root window. I did this a while back to play MPEG
videos on my desktop for fun. :slight_smile:

Note that KDE and some other window managers make a fake root window which
has a different window id… I’m not sure quite how to find out what that id
is.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

export SDL_WINDOWID=0xae worked GREAT! thanks!On Tuesday 15 April 2003 8:06 am, Sam Lantinga wrote:

Actually, it *IS* possible to draw to the desktop in a windows environment. It's one of the few things I did when I started fooling around with the GDI.. You just need to get the handle of the desktop(which is done by calling the GetDC() win32 API function. It takes only one parameter, which is the handle of the window; to get the DC of the desktop, just call it with NULL as your parameter. You will then have a device context to write to using the Win32 GDI.


Protect your PC - Click here for McAfee.com VirusScan Online

You can also do it in X, by setting the SDL_WINDOWID environment variable
to the window id of the root window. I did this a while back to play MPEG
videos on my desktop for fun. :slight_smile:

Note that KDE and some other window managers make a fake root window which
has a different window id… I’m not sure quite how to find out what that
id is.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety. "
–Benjamin Franklin