graphicscomposition/openwfcompositionengine/composition/src/wfcapi.c
changeset 152 9f1c3fea0f87
parent 110 7f25ef56562d
child 168 2bd88482bfe5
--- a/graphicscomposition/openwfcompositionengine/composition/src/wfcapi.c	Tue Jul 06 15:45:57 2010 +0300
+++ b/graphicscomposition/openwfcompositionengine/composition/src/wfcapi.c	Wed Aug 18 11:05:09 2010 +0300
@@ -1,4 +1,5 @@
 /* Copyright (c) 2009-2010 The Khronos Group Inc.
+ * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and/or associated documentation files (the
@@ -258,17 +259,15 @@
     {
         screenNumber = OWF_Screen_GetDefaultNumber();
     }
-    else
+    
+    /* check screen number validity */
+    if (!OWF_Screen_Valid(screenNumber))
     {
-        /* check screen number validity */
-        if (!OWF_Screen_Valid(screenNumber))
-        {
-            FAIL(WFC_ERROR_UNSUPPORTED, WFC_INVALID_HANDLE);
-        }
+        FAIL(WFC_ERROR_UNSUPPORTED, WFC_INVALID_HANDLE);
     }
 
     /* check that no other context currently uses this screen */
-    if (!OWF_Screen_Valid_And_Available(screenNumber))
+    if (WFC_Device_FindScreenNumber(screenNumber))
     {
         FAIL(WFC_ERROR_IN_USE, WFC_INVALID_HANDLE);
     }
@@ -1015,6 +1014,8 @@
 	/* Protect context's target stream from being destroyed by the user
 	 * WFC_CONTEXT_Dtor will reset this flag. */
 	owfNativeStreamSetProtectionFlag(context->stream, OWF_TRUE);
+	
+	OWF_DisplayContext_FlagInternalStreamAccessed(context->displayContext);
 
 	SUCCEED(context->stream);
 }