mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
backends/native: Proxy bell notifications from within the MetaSeatImpl
As with other changes from within the MetaSeatImpl realm, proxy that through a MetaSeatImpl signal, instead of poking directly on the ClutterSeat. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403
This commit is contained in:
parent
074d78bd9b
commit
bc111bf958
@ -222,7 +222,7 @@ meta_input_device_native_is_grouped (ClutterInputDevice *device,
|
|||||||
static void
|
static void
|
||||||
meta_input_device_native_bell_notify (MetaInputDeviceNative *device)
|
meta_input_device_native_bell_notify (MetaInputDeviceNative *device)
|
||||||
{
|
{
|
||||||
clutter_seat_bell_notify (CLUTTER_SEAT (device->seat_impl->seat));
|
meta_seat_impl_notify_bell (device->seat_impl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -110,6 +110,7 @@ enum
|
|||||||
KBD_A11Y_FLAGS_CHANGED,
|
KBD_A11Y_FLAGS_CHANGED,
|
||||||
KBD_A11Y_MODS_STATE_CHANGED,
|
KBD_A11Y_MODS_STATE_CHANGED,
|
||||||
TOUCH_MODE,
|
TOUCH_MODE,
|
||||||
|
BELL,
|
||||||
N_SIGNALS
|
N_SIGNALS
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2740,6 +2741,12 @@ meta_seat_impl_class_init (MetaSeatImplClass *klass)
|
|||||||
0, NULL, NULL,
|
0, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__BOOLEAN,
|
g_cclosure_marshal_VOID__BOOLEAN,
|
||||||
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
|
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
|
||||||
|
signals[BELL] =
|
||||||
|
g_signal_new ("bell",
|
||||||
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
0, NULL, NULL, NULL,
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
g_object_class_install_properties (object_class, N_PROPS, props);
|
g_object_class_install_properties (object_class, N_PROPS, props);
|
||||||
}
|
}
|
||||||
@ -3116,3 +3123,9 @@ meta_seat_impl_notify_kbd_a11y_mods_state_changed (MetaSeatImpl *impl,
|
|||||||
g_signal_emit (impl, signals[KBD_A11Y_MODS_STATE_CHANGED], 0,
|
g_signal_emit (impl, signals[KBD_A11Y_MODS_STATE_CHANGED], 0,
|
||||||
new_latched_mods, new_locked_mods);
|
new_latched_mods, new_locked_mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_seat_impl_notify_bell (MetaSeatImpl *impl)
|
||||||
|
{
|
||||||
|
g_signal_emit (impl, signals[BELL], 0);
|
||||||
|
}
|
||||||
|
@ -261,5 +261,6 @@ void meta_seat_impl_notify_kbd_a11y_flags_changed (MetaSeatImpl *impl,
|
|||||||
void meta_seat_impl_notify_kbd_a11y_mods_state_changed (MetaSeatImpl *impl,
|
void meta_seat_impl_notify_kbd_a11y_mods_state_changed (MetaSeatImpl *impl,
|
||||||
xkb_mod_mask_t new_latched_mods,
|
xkb_mod_mask_t new_latched_mods,
|
||||||
xkb_mod_mask_t new_locked_mods);
|
xkb_mod_mask_t new_locked_mods);
|
||||||
|
void meta_seat_impl_notify_bell (MetaSeatImpl *impl);
|
||||||
|
|
||||||
#endif /* META_SEAT_IMPL_H */
|
#endif /* META_SEAT_IMPL_H */
|
||||||
|
@ -137,6 +137,13 @@ proxy_touch_mode_changed (MetaSeatImpl *impl,
|
|||||||
g_object_notify (G_OBJECT (seat_native), "touch-mode");
|
g_object_notify (G_OBJECT (seat_native), "touch-mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
proxy_bell (MetaSeatImpl *impl,
|
||||||
|
MetaSeatNative *seat_native)
|
||||||
|
{
|
||||||
|
clutter_seat_bell_notify (CLUTTER_SEAT (seat_native));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_seat_native_constructed (GObject *object)
|
meta_seat_native_constructed (GObject *object)
|
||||||
{
|
{
|
||||||
@ -149,6 +156,8 @@ meta_seat_native_constructed (GObject *object)
|
|||||||
G_CALLBACK (proxy_kbd_a11y_mods_state_changed), seat);
|
G_CALLBACK (proxy_kbd_a11y_mods_state_changed), seat);
|
||||||
g_signal_connect (seat->impl, "touch-mode",
|
g_signal_connect (seat->impl, "touch-mode",
|
||||||
G_CALLBACK (proxy_touch_mode_changed), seat);
|
G_CALLBACK (proxy_touch_mode_changed), seat);
|
||||||
|
g_signal_connect (seat->impl, "bell",
|
||||||
|
G_CALLBACK (proxy_bell), seat);
|
||||||
|
|
||||||
seat->core_pointer = meta_seat_impl_get_pointer (seat->impl);
|
seat->core_pointer = meta_seat_impl_get_pointer (seat->impl);
|
||||||
seat->core_keyboard = meta_seat_impl_get_keyboard (seat->impl);
|
seat->core_keyboard = meta_seat_impl_get_keyboard (seat->impl);
|
||||||
|
Loading…
Reference in New Issue
Block a user