mirror of
https://github.com/baketnk/frame-yap.git
synced 2026-10-06 07:00:04 +02:00
Add opt-in fail-closed Xwayland auto insert
This commit is contained in:
1 parent
19a3db7667
commit
c5e925cb48
27 files changed
+588
-45
No files matched your search
@@ -75,6 +75,18 @@ void delivery_checks() {
|
||||
CHECK(deliver_enter(s, fake.factory()) == DeliveryResult::EnterQueued);
|
||||
CHECK((fake.events == std::vector<std::string>{"text:preserve ", "enter"}));
|
||||
}
|
||||
{
|
||||
auto s = review("focus lost during lease"); FakeDelivery fake;
|
||||
auto acquire = fake.factory();
|
||||
const DeliveryFactory invalidated_after_acquisition = [&]() -> std::unique_ptr<DeliveryLease> {
|
||||
auto lease = acquire();
|
||||
throw std::runtime_error("focus changed while connecting to IME");
|
||||
};
|
||||
try { (void)deliver_insert(s, invalidated_after_acquisition); CHECK(false); }
|
||||
catch (const std::runtime_error&) {}
|
||||
CHECK(s.state() == State::Review && s.text() == "focus lost during lease");
|
||||
CHECK(fake.events.empty() && fake.active_leases == 0);
|
||||
}
|
||||
{
|
||||
auto s = review("uncertain"); FakeDelivery fake; fake.fail_text = true;
|
||||
CHECK(deliver_enter(s, fake.factory()) == DeliveryResult::TextUncertain);
|
||||
|
||||
Reference in new issue
Block a user