diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-01 16:41:17 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-01 16:41:17 +0100 |
| commit | 8bcccf9f0f0f69986e315d4288dfdbf119dd19db (patch) | |
| tree | eebb6714fc1e41a0df2784ed22752f0efe2bbdc1 /src/managers/input/InputMethodPopup.hpp | |
| parent | 4ed6b69b68a544a81cec583a1ad8aff218f7db5d (diff) | |
ime-v2: move to new impl
Diffstat (limited to 'src/managers/input/InputMethodPopup.hpp')
| -rw-r--r-- | src/managers/input/InputMethodPopup.hpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/managers/input/InputMethodPopup.hpp b/src/managers/input/InputMethodPopup.hpp index aed4dbc2..61b45d74 100644 --- a/src/managers/input/InputMethodPopup.hpp +++ b/src/managers/input/InputMethodPopup.hpp @@ -4,17 +4,13 @@ #include "../../desktop/WLSurface.hpp" #include "../../macros.hpp" #include "../../helpers/Box.hpp" +#include "../../helpers/signal/Listener.hpp" -struct wlr_input_popup_surface_v2; +class CInputMethodPopupV2; class CInputPopup { public: - CInputPopup(wlr_input_popup_surface_v2* surf); - - void onDestroy(); - void onMap(); - void onUnmap(); - void onCommit(); + CInputPopup(SP<CInputMethodPopupV2> popup); void damageEntire(); void damageSurface(); @@ -24,18 +20,25 @@ class CInputPopup { CBox globalBox(); wlr_surface* getWlrSurface(); + void onCommit(); + private: - void initCallbacks(); - CWLSurface* queryOwner(); - void updateBox(); - - wlr_input_popup_surface_v2* pWlr = nullptr; - CWLSurface surface; - CBox lastBoxLocal; - uint64_t lastMonitor = -1; - - DYNLISTENER(mapPopup); - DYNLISTENER(unmapPopup); - DYNLISTENER(destroyPopup); - DYNLISTENER(commitPopup); + CWLSurface* queryOwner(); + void updateBox(); + + void onDestroy(); + void onMap(); + void onUnmap(); + + WP<CInputMethodPopupV2> popup; + CWLSurface surface; + CBox lastBoxLocal; + uint64_t lastMonitor = -1; + + struct { + CHyprSignalListener map; + CHyprSignalListener unmap; + CHyprSignalListener destroy; + CHyprSignalListener commit; + } listeners; }; |
