aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-06 12:20:11 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-06 12:20:11 +0100
commit5dc3fec277aa543b2cdb2305f56bc2ac15efa8e4 (patch)
tree4595790061b8d0c08024ee3c77583a2a85c35f2c
parentf7246d83d2f43e0088e2a01ff6305ac7e25f21fe (diff)
Matrix/4chan: fix text input not being in order if typing text fast (for example xdotool
m---------depends/mglpp0
-rw-r--r--src/Text.cpp9
2 files changed, 9 insertions, 0 deletions
diff --git a/depends/mglpp b/depends/mglpp
-Subproject d04c98708fd46524c0861baf65e9e4ff62d4879
+Subproject 0108af496da089dbee70ce80d778dfb5c238460
diff --git a/src/Text.cpp b/src/Text.cpp
index 0b6347d..26574bf 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -1289,6 +1289,15 @@ namespace QuickMedia
dirtyText = true;
dirtyCaret = true;
}
+
+ // TODO: Dont do this here! it's slow, but it's needed to process the change before the next event
+ updateGeometry();
+
+ if(editable && (dirtyCaret || caretMoveDirection != CaretMoveDirection::NONE)) {
+ updateCaret();
+ dirtyCaret = false;
+ caretMoveDirection = CaretMoveDirection::NONE;
+ }
}
bool Text::draw(mgl::Window &target)