mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
MetaWaylandPointer: Add 'focus-surface-changed' signal
Add a signal that is emitted when the pointer focus surface of the pointer device changes. This will later be used by the pointer constraints to maybe enable pointer constraints when a surface receives pointer focus. https://bugzilla.gnome.org/show_bug.cgi?id=771050
This commit is contained in:
parent
262b52da50
commit
e6a20a025d
@ -75,6 +75,14 @@
|
||||
|
||||
#define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int (10)
|
||||
|
||||
enum {
|
||||
FOCUS_SURFACE_CHANGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL];
|
||||
|
||||
G_DEFINE_TYPE (MetaWaylandPointer, meta_wayland_pointer, G_TYPE_OBJECT);
|
||||
|
||||
static MetaWaylandPointerClient *
|
||||
@ -843,6 +851,8 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
|
||||
}
|
||||
|
||||
meta_wayland_pointer_update_cursor_surface (pointer);
|
||||
|
||||
g_signal_emit (pointer, signals[FOCUS_SURFACE_CHANGED], 0);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1206,4 +1216,10 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer)
|
||||
static void
|
||||
meta_wayland_pointer_class_init (MetaWaylandPointerClass *klass)
|
||||
{
|
||||
signals[FOCUS_SURFACE_CHANGED] = g_signal_new ("focus-surface-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user