[ros-dev] Strange Stretch Problem

Sebastiaan Roodenburg reactos at sbroodenburg.nl
Tue Jan 17 02:20:21 CET 2006


Hi!

I've set up a build environment, and tested my suggested fix. I had to add a
check for a vaild clipping region to get it to work, but this patch fixes
the problem:

Index: desktop.c
===================================================================
--- desktop.c	(revision 20928)
+++ desktop.c	(working copy)
@@ -1274,11 +1274,12 @@

             if (WinSta->WallpaperMode == wmStretch)
             {
-                NtGdiStretchBlt(hDC,
-                                x,
-                                y,
-                                Rect.right,
-                                Rect.bottom,
+                if(Rect.right && Rect.bottom)
+	                NtGdiStretchBlt(hDC,
+                                x,
+                                y,
+                                sz.cx,
+                                sz.cy,
                                 hWallpaperDC,
                                 0,
                                 0,

Regards,

Sebastiaan

> -----Original Message-----
> From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org]On
> Behalf Of Sebastiaan Roodenburg
> Sent: Monday, January 16, 2006 3:25 PM
> To: ReactOS Development List
> Subject: RE: [ros-dev] Strange Stretch Problem
>
>
> Hi All,
>
> I think the problem is caused by a bug in NtUserPaintDesktop in
> /trunk/reactos/subsys/win32k/ntuser/desktop.c
>
> The NtGdiStrechBlt on line 1277 uses the clipping box (Rect) to
> determin the
> destination with and hight of the background, but no actual clipping is
> preformed. A quick fix (hack?) for the problem would be changing the
> "Rect.right" to "sz.cx" and "Recht.bottom" to "sz.cy". This would
> update the
> entire desktop background on every request (just like the Tile and Centre
> moduses do).
>
> (I don't have a build environment set-up, so i can't test this suggested
> fix, sorry)
>
> Regards,
>
> Sebastiaan
>
> > -----Original Message-----
> > From: ros-dev-bounces at reactos.org [mailto:ros-dev-bounces at reactos.org]On
> > Behalf Of WaxDragon
> > Sent: Monday, January 16, 2006 2:39 PM
> > To: ReactOS Development List
> > Subject: Re: [ros-dev] Strange Stretch Problem
> >
> >
> > I have seen this exact problem.  I was getting around to filing a
> > bug on it. ;0)
> >
> > On 1/16/06, James Tabor
> > <jimtabor at adsl-64-217-116-74.dsl.hstntx.swbell.net> wrote:
> > > Hi all,
> > > Can anyone see the problem with this picture? Every time I move
> > the window,
> > > it looks like back behind the window, it gets redrawn.
> > > Thanks,
> > > James
> > >
> > >
> > > _______________________________________________
> > > Ros-dev mailing list
> > > Ros-dev at reactos.org
> > > http://www.reactos.org/mailman/listinfo/ros-dev
> > >
> > >
> > >
> >
> >
> > --
> > <Alex_Ionescu> it's like saying let's rename Ke to Kernel because
> > people think it's Ketchup
> >
> > _______________________________________________
> > Ros-dev mailing list
> > Ros-dev at reactos.org
> > http://www.reactos.org/mailman/listinfo/ros-dev
> >
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>



More information about the Ros-dev mailing list