diff --git a/include/directfb.h b/include/directfb.h
index 70b6e3a..4b3a661 100644
--- a/include/directfb.h
+++ b/include/directfb.h
@@ -1,4 +1,5 @@
 /*
+   (c) Copyright 2007-2009  Intel Corporation.
    (c) Copyright 2001-2007  The DirectFB Organization (directfb.org)
    (c) Copyright 2000-2004  Convergence (integrated media) GmbH
 
@@ -466,7 +467,9 @@ typedef enum {
                                                 based on each pixel's alpha value. */
      DLCAPS_SCREEN_LOCATION   = 0x00000008,  /* The layer location on the screen can be changed,
                                                 this includes position and size as normalized
-                                                values. The default is 0.0f, 0.0f, 1.0f, 1.0f. */
+                                                values. The default is 0.0f, 0.0f, 1.0f, 1.0f. 
+                                                Supports IDirectFBDisplayLayer::SetScreenLocation() 
+                                                and IDirectFBDisplayLayer::SetScreenRectangle(). */
      DLCAPS_FLICKER_FILTERING = 0x00000010,  /* Flicker filtering can be enabled for smooth output
                                                 on interlaced display devices. */
      DLCAPS_DEINTERLACING     = 0x00000020,  /* The layer provides optional deinterlacing for
@@ -492,10 +495,13 @@ typedef enum {
                                                 lookup table for the alpha bits of these formats.
                                                 See also IDirectFBSurface::SetAlphaRamp(). */
      DLCAPS_PREMULTIPLIED     = 0x00020000,  /* Surfaces with premultiplied alpha are supported. */
-
-     DLCAPS_SCREEN_POSITION   = 0x00100000,
-     DLCAPS_SCREEN_SIZE       = 0x00200000,
-
+     DLCAPS_SCREEN_POSITION   = 0x00100000,  /* The layer position on the screen can be changed. 
+                                                Supports IDirectFBDisplayLayer::SetScreenPosition(). */
+     DLCAPS_SCREEN_SIZE       = 0x00200000,  /* The layer size (defined by its source rectangle) 
+                                                can be scaled to a different size on the screen 
+                                                (defined by its screen/destination rectangle or 
+                                                its normalized size) and does not have to be 1:1 
+                                                with it. */
      DLCAPS_CLIP_REGIONS      = 0x00400000,  /* Supports IDirectFBDisplayLayer::SetClipRegions(). */
 
      DLCAPS_ALL               = 0x0073FFFF
@@ -2476,6 +2482,19 @@ DEFINE_INTERFACE(   IDirectFBDisplayLayer,
       * Set layer configuration.
       *
       * Only available in exclusive or administrative mode.
+      *
+      * Note:  If the layer width and/or height are changed, the layer's 
+      * source rectangle will also be changed and it will be anchored at the 
+      * origin.  In addition, the layer's screen/destination rectangle might 
+      * be updated based upon which of the following functions was last 
+      * previously called:  SetScreenLocation(), SetScreenPosition() and 
+      * SetScreenRectangle().  If SetScreenPosition() was last previously 
+      * called, the screen rectangle's width and height will be set to the new 
+      * layer size.  If the other functions were last previously called, it is 
+      * not updated.  If none of these functions have been called, it is also 
+      * not updated unless the requested layer capabilities include 
+      * DLCAPS_SCREEN_POSITION but not DLCAPS_SCREEN_LOCATION-- in which case 
+      * screen rectangle is updated to use the new layer size centered.
       */
      DFBResult (*SetConfiguration) (
           IDirectFBDisplayLayer              *thiz,
@@ -2488,7 +2507,7 @@ DEFINE_INTERFACE(   IDirectFBDisplayLayer,
      /*
       * Set location on screen as normalized values.
       *
-      * So the whole screen is 0.0, 0.0, -1.0, 1.0.
+      * So the whole screen is 0.0, 0.0, 1.0, 1.0.
       */
      DFBResult (*SetScreenLocation) (
           IDirectFBDisplayLayer              *thiz,
@@ -2862,9 +2881,13 @@ typedef enum {
  * These are important for surface swapping management.
  */
 typedef enum {
-     DSLF_READ           = 0x00000001,  /* request read access while
-                                           surface is locked */
-     DSLF_WRITE          = 0x00000002   /* request write access */
+     DSLF_READ           = 0x00000001,  /* Request read access while
+                                           surface is locked. */
+     DSLF_WRITE          = 0x00000002   /* Request write access. If 
+                                           specified and surface has 
+                                           a back buffer, it will be 
+                                           used. Otherwise, the front 
+                                           buffer is used. */
 } DFBSurfaceLockFlags;
 
 /*
@@ -3045,7 +3068,12 @@ DEFINE_INTERFACE(   IDirectFBSurface,
      /*
       * Lock the surface for the access type specified.
       *
-      * Returns a data pointer and the line pitch of it.
+      * Returns a data pointer and the line pitch of it.<br>
+      * <br>
+      * <b>Note:</b> If the surface is double/triple buffered and 
+      * the DSLF_WRITE flag is specified, the pointer is to the back 
+      * buffer.  In all other cases, the pointer is to the front 
+      * buffer.
       */
      DFBResult (*Lock) (
           IDirectFBSurface         *thiz,
@@ -3524,7 +3552,7 @@ DEFINE_INTERFACE(   IDirectFBSurface,
    /** OpenGL **/
 
      /*
-      * Get an OpenGL context for this surface.
+      * Get a unique OpenGL context for this surface.
       */
      DFBResult (*GetGL) (
           IDirectFBSurface         *thiz,
diff --git a/src/core/layer_context.c b/src/core/layer_context.c
index fff1f1f..0499930 100644
--- a/src/core/layer_context.c
+++ b/src/core/layer_context.c
@@ -1,4 +1,5 @@
 /*
+   (c) Copyright 2007-2009  Intel Corporation.
    (c) Copyright 2001-2007  The DirectFB Organization (directfb.org)
    (c) Copyright 2000-2004  Convergence (integrated media) GmbH
 
@@ -860,8 +861,29 @@ dfb_layer_context_set_sourcerectangle( CoreLayerContext   *context,
      /* Change the source rectangle. */
      config.source = *source;
 
+    CoreLayerRegionConfigFlags  flags   = CLRCF_SOURCE;
+    CoreLayer                   *layer  = dfb_layer_at( context->layer_id );
+
+    D_ASSERT( layer != NULL );
+    D_ASSERT( layer->shared != NULL );
+
+    /*
+        If the display layer does not support scaling and the destination 
+        rectangle size is not the same as the source, change it to match.  The 
+        origin is left alone to allow the driver to handle it.
+    */
+    if ( !D_FLAGS_IS_SET( layer->shared->description.caps, DLCAPS_SCREEN_SIZE ) && 
+         ( config.dest.w != config.source.w || 
+           config.dest.h != config.source.h ) )
+    {
+        config.dest.w = config.source.w;
+        config.dest.h = config.source.h;
+
+        flags |= CLRCF_DEST;
+    }
+
      /* Try to set the new configuration. */
-     ret = update_primary_region_config( context, &config, CLRCF_SOURCE );
+     ret = update_primary_region_config( context, &config, flags );
 
      /* Unlock the context. */
      dfb_layer_context_unlock( context );
@@ -1363,6 +1385,12 @@ build_updated_config( CoreLayer                   *layer,
 
                     ret_config->dest.x = (width  - ret_config->width)  / 2;
                     ret_config->dest.y = (height - ret_config->height) / 2;
+
+                    // Just in case the underlying hardware needs even 'y' coordinates for
+                    // interlaced modes, make certain that this returns an 'even'
+                    // value for 'y'. 
+                    ret_config->dest.y &= 0xFFFFFFFE;
+
                     /* fall through */
 
                case CLLM_POSITION:
@@ -1372,6 +1400,23 @@ build_updated_config( CoreLayer                   *layer,
 
                case CLLM_LOCATION:
                case CLLM_RECTANGLE:
+                    D_ASSERT( layer->shared != NULL );
+                         
+                    /*
+                        If the display layer does not support scaling and the 
+                        destination rectangle size is not the same as the 
+                        source rectangle, change it to match.  The origin is 
+                        left alone to allow the driver to handle it.
+                    */
+                    if ( !D_FLAGS_IS_SET( 
+                                layer->shared->description.caps, 
+                                DLCAPS_SCREEN_SIZE ) && 
+                         ( ret_config->dest.w != ret_config->source.w || 
+                           ret_config->dest.h != ret_config->source.h ) )
+                    {
+                        ret_config->dest.w = ret_config->width;
+                        ret_config->dest.h = ret_config->height;
+                    }
                     break;
 
                default:
