DSWaylandKeyboard: add resetFocus() 66/241866/1
authorSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 06:01:01 +0000 (15:01 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 10:12:24 +0000 (19:12 +0900)
Change-Id: I4bb3fbb00fd297762daeed0671cf0b3200f2aed1
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/DSWaylandServer/DSWaylandKeyboard.cpp
src/DSWaylandServer/DSWaylandKeyboard.h

index 48ce7f4..e920198 100644 (file)
@@ -285,6 +285,13 @@ void DSWaylandKeyboard::setFocus(DSWaylandSurface *waylandSurface)
        }
 }
 
+void DSWaylandKeyboard::resetFocus()
+{
+       DS_GET_PRIV(DSWaylandKeyboard);
+       priv->__focusSurface = nullptr;
+       priv->__focusClient = nullptr;
+}
+
 DSWaylandSurface *DSWaylandKeyboard::getFocus()
 {
        DS_GET_PRIV(DSWaylandKeyboard);
index 0dd4722..1a577b9 100644 (file)
@@ -51,6 +51,7 @@ public:
 
        void addClient(DSWaylandClient *client, uint32_t id, int version);
        void setFocus(DSWaylandSurface *waylandSurface);
+       void resetFocus();
        DSWaylandSurface *getFocus();
 
        void sendKeyDown(uint32_t keycode);