diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-17 12:06:09 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-17 12:06:09 +0200 |
commit | 18ef6b111b61c96f316349680142c4e070cbe817 (patch) | |
tree | a42fb76f8844c3b16bc9cb84e5d657513f7090da /AK/WeakPtr.h | |
parent | b77f9a5042fcddf9fa18d2fb9c047f3e272ccce6 (diff) | |
download | serenity-18ef6b111b61c96f316349680142c4e070cbe817.zip |
WindowServer: Mouse switching between system menu and app menu was broken.
Diffstat (limited to 'AK/WeakPtr.h')
-rw-r--r-- | AK/WeakPtr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/AK/WeakPtr.h b/AK/WeakPtr.h index f5413ca6d6..89dbcd93f4 100644 --- a/AK/WeakPtr.h +++ b/AK/WeakPtr.h @@ -4,6 +4,8 @@ namespace AK { +template<typename T> class OwnPtr; + template<typename T> class WeakPtr { friend class Weakable<T>; @@ -43,6 +45,8 @@ public: WeakLink<T>* leak_link() { return m_link.leak_ref(); } + bool operator==(const OwnPtr<T>& other) const { return ptr() == other.ptr(); } + private: WeakPtr(RetainPtr<WeakLink<T>>&& link) : m_link(move(link)) { } |