Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more complete input method support #2053

Merged
merged 20 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8f53847
implement input method keyboard grab
lilydjwg Oct 31, 2023
e5699cb
support input method popups
lilydjwg Nov 18, 2023
eb4760a
input method: avoid disabling a just-enabled text input on focus change
lilydjwg Nov 24, 2023
316955b
workaround focus change while preediting
lilydjwg Nov 24, 2023
74443a5
input method: don't grab keyboard if no text input is focused
lilydjwg Dec 5, 2023
371600a
input method: fix conflicts with compositor shortcut keys
lilydjwg Dec 5, 2023
e0fce8a
input method: address reviews
lilydjwg Dec 8, 2023
880bb88
use at place_popup_at function to convert from relative coordinates t…
lilydjwg Dec 8, 2023
d60b7bb
input method: simplify key handling code
lilydjwg Dec 8, 2023
a09a560
fix style
lilydjwg Dec 8, 2023
6ce370d
convert coordinates type
lilydjwg Dec 8, 2023
1682ced
input method: use input_method->active instead of already_disabled_input
lilydjwg Dec 26, 2023
302838f
move place_popup_at to view-impl
lilydjwg Dec 27, 2023
cda1913
input method: explain the focus change workaround in detail
lilydjwg Dec 27, 2023
7940111
input method: use pid to identify the input method sent key events
lilydjwg Dec 26, 2023
c302c35
fix headers
lilydjwg Dec 27, 2023
5f0ce1f
input method: better ways to identify IM sent keys
lilydjwg Dec 30, 2023
8a9cf96
Revert "input method: use input_method->active instead of already_dis…
lilydjwg Dec 30, 2023
91e8f06
input method: don't send deactivate command if the input is not the c…
lilydjwg Dec 30, 2023
bfaef7a
fix code style
lilydjwg Dec 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/core/seat/input-method-relay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ wf::input_method_relay::input_method_relay()
auto evt_input_method = static_cast<wlr_input_method_v2*>(data);
assert(evt_input_method == input_method);

// FIXME: workaround focus change while preediting
ammen99 marked this conversation as resolved.
Show resolved Hide resolved
if (focus_just_changed)
{
LOGI("focus_just_changed, ignore input method commit");
focus_just_changed = false;
return;
}

auto *text_input = find_focused_text_input();
if (text_input == nullptr)
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/seat/input-method-relay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class input_method_relay
on_grab_keyboard, on_grab_keyboard_destroy, on_new_popup_surface;
wlr_input_method_keyboard_grab_v2 *keyboard_grab = nullptr;
wlr_text_input_v3 *already_disabled_input = nullptr;
bool focus_just_changed = false;
text_input *find_focusable_text_input();
void set_focus(wlr_surface*);

Expand All @@ -36,6 +37,8 @@ class input_method_relay
{
set_focus(nullptr);
}

focus_just_changed = true;
};

bool should_grab(wlr_keyboard*);
Expand Down