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

(#3379 #3307) Fix accidentally consuming input events on alt key up #3382

Merged
merged 3 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions src/miral/minimal_window_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,8 @@ bool miral::MinimalWindowManager::handle_keyboard_event(MirKeyboardEvent const*
switch (mir_keyboard_event_scan_code(event))
{
case KEY_LEFTALT:
if (self->application_selector.complete() != nullptr)
return true;
break;
self->application_selector.complete();
[[fallthrough]];
default:;
}
}
Expand Down
16 changes: 0 additions & 16 deletions src/server/frontend_wayland/keyboard_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mir/events/keyboard_event.h"
#include "mir/input/seat.h"
#include "mir/fatal.h"
#include "mir/log.h"

#include <cstring> // memcpy
#include <unordered_set>
Expand Down Expand Up @@ -62,7 +61,6 @@ void mf::KeyboardHelper::handle_event(std::shared_ptr<MirEvent const> const& eve
switch (mir_input_event_get_type(mir_event_get_input_event(event.get())))
{
case mir_input_event_type_keyboard_resync:
mir::log_debug("mir_input_event_type_keyboard_resync is causing modifiers to be refreshed");
refresh_modifiers();
break;

Expand Down Expand Up @@ -150,20 +148,6 @@ void mf::KeyboardHelper::set_keymap(std::shared_ptr<mi::Keymap> const& new_keyma

void mf::KeyboardHelper::set_modifiers(MirXkbModifiers const& new_modifiers)
{
mir::log_debug(
"Modifiers are being set from: depressed=0x%08x, latched=0x%08x, locked=0x%08x, effective_layout=0x%08x",
modifiers.depressed,
modifiers.latched,
modifiers.locked,
modifiers.effective_layout);

mir::log_debug(
"Modifiers are being set to: depressed=0x%08x, latched=0x%08x, locked=0x%08x, effective_layout=0x%08x",
new_modifiers.depressed,
new_modifiers.latched,
new_modifiers.locked,
new_modifiers.effective_layout);

if (new_modifiers != modifiers)
{
modifiers = new_modifiers;
Expand Down
9 changes: 0 additions & 9 deletions src/server/frontend_wayland/wl_keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ void mf::WlKeyboard::focus_on(WlSurface* surface)
auto const serial = client->next_serial(nullptr);
send_enter_event(serial, surface->raw_resource(), &key_state);
wl_array_release(&key_state);
mir::log_debug("Surface (id=%u) has been focused and is refreshing its modifiers",
wl_resource_get_id(surface->raw_resource()));
helper->refresh_modifiers();
}

Expand Down Expand Up @@ -112,13 +110,6 @@ void mf::WlKeyboard::send_key(std::shared_ptr<MirKeyboardEvent const> const& eve

void mf::WlKeyboard::send_modifiers(MirXkbModifiers const& modifiers)
{
mir::log_debug(
"Sending modifiers event: depressed=0x%08x, latched=0x%08x, locked=0x%08x, effective_layout=0x%08x",
modifiers.depressed,
modifiers.latched,
modifiers.locked,
modifiers.effective_layout);

auto const serial = client->next_serial(nullptr);
send_modifiers_event(
serial,
Expand Down
Loading