Skip to content

Commit

Permalink
Validating input in the activation method rather than the commit, and…
Browse files Browse the repository at this point in the history
… making sure that tokens are invalidated if a keyboard event comes in
  • Loading branch information
mattkae committed Oct 18, 2024
1 parent 302787d commit e6be816
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 109 deletions.
3 changes: 2 additions & 1 deletion src/server/frontend_wayland/wayland_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ mf::WaylandConnector::WaylandConnector(
desktop_file_manager,
session_lock_,
decoration_strategy,
focus_controller});
focus_controller,
keyboard_observer_registrar});

shm_global = std::make_unique<WlShm>(display.get(), executor);

Expand Down
1 change: 1 addition & 0 deletions src/server/frontend_wayland/wayland_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class WaylandExtensions
std::shared_ptr<scene::SessionLock> session_lock;
std::shared_ptr<mir::DecorationStrategy> decoration_strategy;
std::shared_ptr<shell::FocusController> focus_controller;
std::shared_ptr<ObserverRegistrar<input::KeyboardObserver>> keyboard_observer_registrar;
};

WaylandExtensions() = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,13 @@ std::vector<ExtensionBuilder> const internal_extension_builders = {
}),
make_extension_builder<mw::XdgActivationV1>([](auto const& ctx)
{
return mf::create_xdg_activation_v1(ctx.display, ctx.shell, ctx.focus_controller, ctx.main_loop);
return mf::create_xdg_activation_v1(
ctx.display,
ctx.shell,
ctx.focus_controller,
ctx.main_loop,
ctx.keyboard_observer_registrar,
*ctx.wayland_executor);
}),
};

Expand Down
Loading

0 comments on commit e6be816

Please sign in to comment.