summaryrefslogtreecommitdiff
path: root/src/managers/input/InputMethodRelay.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-03-24 16:08:25 +0000
committerVaxry <vaxry@vaxry.net>2024-03-24 16:08:25 +0000
commit5cc4bf699cfe4d5915b8ea9f2a7c8449cdc7bd2f (patch)
treed524435ee7bafe19d1bfdb2d741bc0e2c7ae30ee /src/managers/input/InputMethodRelay.hpp
parentacf15e5579a5d2bbbe4a13e87306445e31ea5e4f (diff)
IME: Refactor and fixup popups
Diffstat (limited to 'src/managers/input/InputMethodRelay.hpp')
-rw-r--r--src/managers/input/InputMethodRelay.hpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/managers/input/InputMethodRelay.hpp b/src/managers/input/InputMethodRelay.hpp
index 7618400f..f19b4bb5 100644
--- a/src/managers/input/InputMethodRelay.hpp
+++ b/src/managers/input/InputMethodRelay.hpp
@@ -4,8 +4,10 @@
#include "../../defines.hpp"
#include "../../helpers/WLClasses.hpp"
#include "TextInput.hpp"
+#include "InputMethodPopup.hpp"
class CInputManager;
+class CHyprRenderer;
struct STextInputV1;
class CInputMethodRelay {
@@ -27,18 +29,20 @@ class CInputMethodRelay {
SIMEKbGrab* getIMEKeyboardGrab(SKeyboard*);
- void setIMEPopupFocus(SIMEPopup*, wlr_surface*);
- void updateInputPopup(SIMEPopup*);
- void damagePopup(SIMEPopup*);
- void removePopup(SIMEPopup*);
+ void setIMEPopupFocus(CInputPopup*, wlr_surface*);
+ void removePopup(CInputPopup*);
+
+ CInputPopup* popupFromCoords(const Vector2D& point);
+
+ void updateAllPopups();
private:
- std::unique_ptr<SIMEKbGrab> m_pKeyboardGrab;
+ std::unique_ptr<SIMEKbGrab> m_pKeyboardGrab;
- std::list<std::unique_ptr<CTextInput>> m_vTextInputs;
- std::list<SIMEPopup> m_lIMEPopups;
+ std::vector<std::unique_ptr<CTextInput>> m_vTextInputs;
+ std::vector<std::unique_ptr<CInputPopup>> m_vIMEPopups;
- wlr_surface* m_pLastKbFocus = nullptr;
+ wlr_surface* m_pLastKbFocus = nullptr;
DYNLISTENER(textInputNew);
DYNLISTENER(IMECommit);
@@ -50,4 +54,5 @@ class CInputMethodRelay {
friend class CInputManager;
friend class CTextInputV1ProtocolManager;
friend struct CTextInput;
+ friend class CHyprRenderer;
};