From 2e3803c65ec0a44bfef80ef9ec1014637a6a3781 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 7 Apr 2017 17:08:12 +1000 Subject: Allowing assigning Windows and ensure cursorLast is initialized. --- include/Platform.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/Platform.h b/include/Platform.h index 48ee720ca..411d42a03 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -363,6 +363,14 @@ public: virtual ~Window(); Window &operator=(WindowID wid_) { wid = wid_; + cursorLast = cursorInvalid; + return *this; + } + Window &operator=(const Window &other) { + if (this != &other) { + wid = other.wid; + cursorLast = other.cursorLast; + } return *this; } WindowID GetID() const { return wid; } -- cgit v1.2.3