Skip to content

Commit

Permalink
pr feedback: listening for focus changes and ensuring that the newly …
Browse files Browse the repository at this point in the history
…focused surface is the same session that requested the token
  • Loading branch information
mattkae committed Oct 29, 2024
1 parent e6be816 commit 38b7187
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 72 deletions.
4 changes: 2 additions & 2 deletions src/server/frontend_wayland/wayland_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ mf::WaylandConnector::WaylandConnector(
bool enable_key_repeat,
std::shared_ptr<scene::SessionLock> const& session_lock,
std::shared_ptr<mir::DecorationStrategy> const& decoration_strategy,
std::shared_ptr<shell::FocusController> const& focus_controller)
std::shared_ptr<scene::SessionCoordinator> const& session_coordinator)
: extension_filter{extension_filter},
display{wl_display_create(), &cleanup_display},
pause_signal{eventfd(0, EFD_CLOEXEC | EFD_SEMAPHORE)},
Expand Down Expand Up @@ -330,7 +330,7 @@ mf::WaylandConnector::WaylandConnector(
desktop_file_manager,
session_lock_,
decoration_strategy,
focus_controller,
session_coordinator,
keyboard_observer_registrar});

shm_global = std::make_unique<WlShm>(display.get(), executor);
Expand Down
6 changes: 3 additions & 3 deletions src/server/frontend_wayland/wayland_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class DisplayConfigurationObserver;
namespace shell
{
class Shell;
class FocusController;
}
namespace scene
{
Expand All @@ -68,6 +67,7 @@ class IdleHub;
class Surface;
class TextInputHub;
class SessionLock;
class SessionCoordinator;
}
namespace time
{
Expand Down Expand Up @@ -114,7 +114,7 @@ class WaylandExtensions
std::shared_ptr<DesktopFileManager> desktop_file_manager;
std::shared_ptr<scene::SessionLock> session_lock;
std::shared_ptr<mir::DecorationStrategy> decoration_strategy;
std::shared_ptr<shell::FocusController> focus_controller;
std::shared_ptr<scene::SessionCoordinator> session_coordinator;
std::shared_ptr<ObserverRegistrar<input::KeyboardObserver>> keyboard_observer_registrar;
};

Expand Down Expand Up @@ -169,7 +169,7 @@ class WaylandConnector : public Connector
bool enable_key_repeat,
std::shared_ptr<scene::SessionLock> const& session_lock,
std::shared_ptr<DecorationStrategy> const& decoration_strategy,
std::shared_ptr<shell::FocusController> const& focus_controller);
std::shared_ptr<scene::SessionCoordinator> const& session_coordinator);

~WaylandConnector() override;

Expand Down
4 changes: 2 additions & 2 deletions src/server/frontend_wayland/wayland_default_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ std::vector<ExtensionBuilder> const internal_extension_builders = {
return mf::create_xdg_activation_v1(
ctx.display,
ctx.shell,
ctx.focus_controller,
ctx.session_coordinator,
ctx.main_loop,
ctx.keyboard_observer_registrar,
*ctx.wayland_executor);
Expand Down Expand Up @@ -396,7 +396,7 @@ std::shared_ptr<mf::Connector>
enable_repeat,
the_session_lock(),
the_decoration_strategy(),
the_focus_controller());
the_session_coordinator());
});
}

Expand Down
Loading

0 comments on commit 38b7187

Please sign in to comment.