keyboard_layout_monitor_wayland: Mitigate log spam
With this change we set the current group if already not set and then look for presence of prveious notification of xkb state/map. This will reduce the noise in the logs, since we are seeing the compositor sending us the same group again. Bug: chromium:1291247 Change-Id: If83e5de30e27d36304cbf99d2fe76ea5d0659963 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4192068 Auto-Submit: Salman Malik <salmanmalik@chromium.org> Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org> Commit-Queue: Salman Malik <salmanmalik@chromium.org> Cr-Commit-Position: refs/heads/main@{#1096422}
This commit is contained in:
@ -172,13 +172,13 @@ void KeyboardLayoutMonitorWayland::ProcessModifiersAndNotifyCallbacks(
|
||||
return;
|
||||
}
|
||||
|
||||
current_group_ = static_cast<xkb_layout_index_t>(group);
|
||||
|
||||
if (!xkb_state_) {
|
||||
LOG(WARNING) << "Received modifier without keymap?";
|
||||
return;
|
||||
}
|
||||
|
||||
current_group_ = static_cast<xkb_layout_index_t>(group);
|
||||
|
||||
DCHECK(keymap_);
|
||||
|
||||
layout_changed_callback_.Run(GenerateProtocolLayoutMessage());
|
||||
|
Reference in New Issue
Block a user