Skip to content

Commit

Permalink
Also check title change event (it occurs in case tab change in browser)
Browse files Browse the repository at this point in the history
So for now we remember keyboard layout for each tab in browser and
reapply it on focus
  • Loading branch information
dmitry-j-mikhin committed Oct 10, 2023
1 parent f2e2da5 commit 9457ed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sway.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ int sway_monitor(on_focus fn_focus, on_close fn_close, on_layout fn_layout)
struct json_object* event_node;
if (json_object_object_get_ex(msg, "change", &event_node)) {
const char* event_name = json_object_get_string(event_node);
if (strcmp(event_name, "focus") == 0) {
if (strcmp(event_name, "focus") == 0 || strcmp(event_name, "title") == 0) {
char w_str[1024];
fill_window_name(w_str, sizeof(w_str), msg);
const int layout = fn_focus(w_str);
Expand Down

0 comments on commit 9457ed7

Please sign in to comment.