Re: use wine as screensaver for x

2006-10-24 Thread Detlef Riekenberg
On Mo, 2006-10-23 at 11:11 -0700, Mike Hearn wrote:

> The way I did it was just to redirect the first created window, but again,
> it was hacky. Hopefully you can find a better way.


I dropped the explorer-idea and patched only winex11.drv:

After XSCREENSAVER_WINDOW was detected on DllMain/PROCESS_ATTACH,
I validated lpszClassName from CREATESTRUCTA (in X11DRV_CreateWindow),
set a new flag in x11drv_win_data and modified create_whole_window /
destroy_whole_window.

That was ok for fullscreen, but it need more work (and a wrapper) for
the Preview-Case ("wine screensavername.scr /p hWnd")
With "/s" for the preview in "xscrennsaver-demo", the graphic is to
large.


-- 
 
By by ... Detlef






Re: use wine as screensaver for x

2006-10-23 Thread Mike Hearn
Yep, I've done this before but it was an evil, awful hack and I don't have
the patch anymore (probably just as well) :)

The way I did it was just to redirect the first created window, but again,
it was hacky. Hopefully you can find a better way.



On Thu, 19 Oct 2006 00:04:39 +0200, Detlef Riekenberg wrote:

> Hi.
> 
> While waiting for the commit of my localspl-Patches, 
> i want to picked up an fun project:
> 
> Has anyone an Idea, how to modify "user32.dll" and
> "winex11.drv" to open a Window, when I already have the
> X11 Window-ID (example: XSCREENSAVER_WINDOW=0x280020)? 
> 
> My Idea is to include the wrapper code in explorer.exe
> and use similar code as already present for "/desktop".
> 
> The Window width and height is not known on startup
> and does not match a well-known Desktop Size.
> I think, I need to add an Export to winex11.drv to fetch
> the size and reuse "X11DRV_create_desktop()" or add an Export
> to someting similar as "X11DRV_create_desktop()".
> 
> 
> The client registers a Window Class with a known name
> ("WindowsScreenSaverClass") and then CreateWindowEx must be 
> redirected to the already created X11-Window.
> 
> A lightwight solution might be to implement minimal features
> from "scrsave.lib" (RegisterClass) in "explorer.exe"
> and then call "ScreenSaverProc" directly.
> 
> 
> Any Ideas?






use wine as screensaver for x

2006-10-18 Thread Detlef Riekenberg
Hi.

While waiting for the commit of my localspl-Patches, 
i want to picked up an fun project:

Has anyone an Idea, how to modify "user32.dll" and
"winex11.drv" to open a Window, when I already have the
X11 Window-ID (example: XSCREENSAVER_WINDOW=0x280020)? 

My Idea is to include the wrapper code in explorer.exe
and use similar code as already present for "/desktop".

The Window width and height is not known on startup
and does not match a well-known Desktop Size.
I think, I need to add an Export to winex11.drv to fetch
the size and reuse "X11DRV_create_desktop()" or add an Export
to someting similar as "X11DRV_create_desktop()".


The client registers a Window Class with a known name
("WindowsScreenSaverClass") and then CreateWindowEx must be 
redirected to the already created X11-Window.

A lightwight solution might be to implement minimal features
from "scrsave.lib" (RegisterClass) in "explorer.exe"
and then call "ScreenSaverProc" directly.


Any Ideas?

-- 
 
By by ... Detlef