Skip to content

Commit

Permalink
XKBMappingStateRegistrar -> XkbMappingStateLedRegistrar
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae committed Jul 1, 2024
1 parent cd0a4ed commit de5f7f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/include/server/mir/input/xkb_mapper_registrar.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ class XKBMapperRegistrar : public KeyMapper, public LedObserverRegistrar

struct XkbMappingState
{
class XKBMappingStateRegistrar : public ObserverMultiplexer<LedObserver>
class XkbMappingStateLedRegistrar : public ObserverMultiplexer<LedObserver>
{
public:
explicit XKBMappingStateRegistrar(Executor&);
explicit XkbMappingStateLedRegistrar(Executor&);
void leds_set(KeyboardLeds leds) override;
};

Expand All @@ -104,7 +104,7 @@ class XKBMapperRegistrar : public KeyMapper, public LedObserverRegistrar
MirInputEventModifiers modifiers() const;
auto xkb_modifiers() const -> MirXkbModifiers;
void notify_leds_changed();
XKBMappingStateRegistrar& get_registrar();
XkbMappingStateLedRegistrar& get_registrar();
private:
/// Returns a pair containing the keysym for the given scancode and if any XKB modifiers have been changed
auto update_state(
Expand All @@ -122,7 +122,7 @@ class XKBMapperRegistrar : public KeyMapper, public LedObserverRegistrar
xkb_led_index_t num_led;
xkb_led_index_t caps_led;
xkb_led_index_t scroll_led;
XKBMappingStateRegistrar registrar;
XkbMappingStateLedRegistrar registrar;
};

XkbMappingState* get_keymapping_state(MirInputDeviceId id);
Expand Down
6 changes: 3 additions & 3 deletions src/server/input/xkb_mapper_registrar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ mi::XKBContextPtr mi::make_unique_context()
return {context, &xkb_context_unref};
}

mircv::XKBMapperRegistrar::XkbMappingState::XKBMappingStateRegistrar::XKBMappingStateRegistrar(mir::Executor& executor)
mircv::XKBMapperRegistrar::XkbMappingState::XkbMappingStateLedRegistrar::XkbMappingStateLedRegistrar(mir::Executor& executor)
: ObserverMultiplexer<LedObserver>(executor)
{
}

void mircv::XKBMapperRegistrar::XkbMappingState::XKBMappingStateRegistrar::leds_set(mir::input::KeyboardLeds leds)
void mircv::XKBMapperRegistrar::XkbMappingState::XkbMappingStateLedRegistrar::leds_set(mir::input::KeyboardLeds leds)
{
for_each_observer(&LedObserver::leds_set, leds);
}
Expand Down Expand Up @@ -411,7 +411,7 @@ void mircv::XKBMapperRegistrar::XkbMappingState::notify_leds_changed()
registrar.leds_set(leds);
}

mircv::XKBMapperRegistrar::XkbMappingState::XKBMappingStateRegistrar& mircv::XKBMapperRegistrar::XkbMappingState::get_registrar()
mircv::XKBMapperRegistrar::XkbMappingState::XkbMappingStateLedRegistrar& mircv::XKBMapperRegistrar::XkbMappingState::get_registrar()
{
return registrar;
}
Expand Down

0 comments on commit de5f7f5

Please sign in to comment.