Window: Add window "token" type, unique for each window instance
Not recycled even for windows with same class/ID Token may outlive window, unlike pointer
This commit is contained in:
@@ -255,6 +255,8 @@ struct Window : ZeroedMemoryAllocator {
|
||||
WindowClass window_class; ///< Window class
|
||||
|
||||
private:
|
||||
WindowToken window_token;
|
||||
|
||||
/**
|
||||
* Helper allocation function to disallow something.
|
||||
* Don't allow arrays; arrays of Windows are pointless as you need
|
||||
@@ -334,6 +336,8 @@ public:
|
||||
|
||||
void ChangeWindowClass(WindowClass cls);
|
||||
|
||||
WindowToken GetWindowToken() const { return this->window_token; }
|
||||
|
||||
/**
|
||||
* Set the timeout flag of the window and initiate the timer.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user