IME: Refactor and fixup popups
This commit is contained in:
parent
acf15e5579
commit
5cc4bf699c
12 changed files with 260 additions and 198 deletions
41
src/managers/input/InputMethodPopup.hpp
Normal file
41
src/managers/input/InputMethodPopup.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include "../../helpers/WLListener.hpp"
|
||||
#include "../../desktop/WLSurface.hpp"
|
||||
#include "../../macros.hpp"
|
||||
#include "../../helpers/Box.hpp"
|
||||
|
||||
struct wlr_input_popup_surface_v2;
|
||||
|
||||
class CInputPopup {
|
||||
public:
|
||||
CInputPopup(wlr_input_popup_surface_v2* surf);
|
||||
|
||||
void onDestroy();
|
||||
void onMap();
|
||||
void onUnmap();
|
||||
void onCommit();
|
||||
|
||||
void damageEntire();
|
||||
void damageSurface();
|
||||
|
||||
bool isVecInPopup(const Vector2D& point);
|
||||
|
||||
CBox globalBox();
|
||||
wlr_surface* getWlrSurface();
|
||||
|
||||
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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue