fix(wayland): text input enables once per focus; touches route by their finger's window
enable resets the input method's state, so sending it with every caret
move (an application keeps the cursor rectangle current while typing)
dropped the composition at each keystroke: enable now goes once per
focus and a moved caret sends its rectangle alone; disable only takes
back an enable. The compositor's leave ends both, and a window still
showing composing text hears onPreedit("") then. A finger's up and motion
go to the window it went down on, not the window of the latest down. The
seat creates its pointer and keyboard once, as it already did the touch:
capabilities come again when a device appears or goes, and a second
keyboard proxy delivered every key twice.
This commit is contained in:
parent
c8b5739e1a
commit
1498a5bf4b
3 changed files with 32 additions and 10 deletions
|
|
@ -61,6 +61,8 @@ export namespace Crafter {
|
|||
inline static xkb_state* xkb_state;
|
||||
inline static std::vector<Window*> windows;
|
||||
inline static wl_pointer* wlPointer;
|
||||
inline static wl_pointer* seatPointer = nullptr;
|
||||
inline static wl_keyboard* seatKeyboard = nullptr;
|
||||
inline static wl_touch* wlTouch = nullptr;
|
||||
inline static Window* touchWindow = nullptr; // the window under the fingers
|
||||
// The fingers down, by the compositor's id, in physical pixels. Plain
|
||||
|
|
@ -70,6 +72,7 @@ export namespace Crafter {
|
|||
float x;
|
||||
float y;
|
||||
bool used;
|
||||
Window* window;
|
||||
};
|
||||
inline static std::array<TouchSlot, 10> touchSlots{};
|
||||
static void ForgetTouches();
|
||||
|
|
|
|||
Loading…
Reference in a new issue