DSPointer: add resetFocus() 70/241870/1
authorSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 06:04:25 +0000 (15:04 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 10:12:27 +0000 (19:12 +0900)
Change-Id: I6a7e8b1104f92367ba8cefc170b9255886204638
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/DSSeat/DSPointer.cpp
src/DSSeat/DSPointer.h

index 3f6375e..12f3c0c 100644 (file)
@@ -169,6 +169,18 @@ void DSPointer::setFocus(std::shared_ptr<DSWindow> window)
        __dswlPointer->setFocus(waylandSurface);
 }
 
+void DSPointer::resetFocus()
+{
+       if (__ptrFocus)
+       {
+               __ptrFocus = nullptr;
+               DSLOG_INF("DSPointer", "ptrFocus has been reset.");
+       }
+
+       if (__dswlPointer)
+               __dswlPointer->resetFocus();
+}
+
 std::shared_ptr<DSWindow> DSPointer::getFocus()
 {
        return __ptrFocus;
index 5717c51..79dc209 100644 (file)
@@ -51,6 +51,7 @@ public:
        void mouseIn(int x, int y);
        void mouseOut();
        void setFocus(std::shared_ptr<DSWindow> window);
+       void resetFocus();
        std::shared_ptr<DSWindow> getFocus();
 
 private: