blob: 28479b0ace9a066e071d7dfd168b9a5d98b08f8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# HG changeset patch
# User Neil <nyamatongwe@gmail.com>
# Date 1491548892 -36000
# Node ID df221375187cab18a3e1c73ae83fa46805bf98db
# Parent ef932abba46c57933959a83bd63fafc429d35259
Allowing assigning Windows and ensure cursorLast is initialized.
diff -r ef932abba46c -r df221375187c include/Platform.h
--- a/include/Platform.h Thu Apr 06 21:04:52 2017 +1000
+++ b/include/Platform.h Fri Apr 07 17:08:12 2017 +1000
@@ -363,6 +363,14 @@
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; }
|