DSSeat: fix build warning, getTopWindowOnPosition() to return value properly 48/241848/1
authorSung-Jin Park <sj76.park@samsung.com>
Wed, 19 Aug 2020 03:58:28 +0000 (12:58 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 10:12:06 +0000 (19:12 +0900)
Change-Id: I8b8c9072f8a7e6c7eb91968f58f5e5744e58b36f
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/DSSeat/DSSeat.cpp

index d8aab6c..b98574d 100644 (file)
@@ -21,7 +21,6 @@
 * DEALINGS IN THE SOFTWARE.
 */
 
-#include "DSCore.h"
 #include "DSSeat.h"
 #include "DSInput.h"
 #include "DSCompositor.h"
@@ -30,6 +29,7 @@
 #include "DSInputEvent.h"
 #include "DSXkb.h"
 #include "DSZone.h"
+#include "DSWindow.h"
 
 #include "DSPointer.h"
 #include "DSKeyboard.h"
@@ -515,8 +515,7 @@ std::shared_ptr<DSWindow> DSSeat::getTopWindowOnPosition(int x, int y)
        stPosition wPos;
        stSize wSize;
 
-       std::list<std::shared_ptr<DSWindow>> wList = __zone->getWindowList();
-       for (auto w : wList)
+       for (std::shared_ptr<DSWindow> w : __zone->getWindowList())
        {
                wSize = w->getSize();
                wPos = w->getPosition();
@@ -527,6 +526,8 @@ std::shared_ptr<DSWindow> DSSeat::getTopWindowOnPosition(int x, int y)
                        return w;
                }
        }
+
+       return nullptr;
 }
 
 } // namespace display_server