MetaWaylandPointer: Put client resources in its own struct
Instead of moving around all the bound pointer resources for a client when changing focus, keep all the resources bound by a client in a per client struct, and track the focus by having a pointer to the current active pointer client struct instance. This will simplify having wl_pointer extensinos sharing the pointer focus of the wl_pointer by only having to add them to the pointer client. https://bugzilla.gnome.org/show_bug.cgi?id=744104
This commit is contained in:

committed by
Carlos Garnacho

parent
cba2ab445e
commit
1ee387bb31
@@ -44,12 +44,17 @@ struct _MetaWaylandPointerGrab
|
||||
MetaWaylandPointer *pointer;
|
||||
};
|
||||
|
||||
struct _MetaWaylandPointerClient
|
||||
{
|
||||
struct wl_list pointer_resources;
|
||||
};
|
||||
|
||||
struct _MetaWaylandPointer
|
||||
{
|
||||
struct wl_display *display;
|
||||
|
||||
struct wl_list resource_list;
|
||||
struct wl_list focus_resource_list;
|
||||
MetaWaylandPointerClient *focus_client;
|
||||
GHashTable *pointer_clients;
|
||||
|
||||
MetaWaylandSurface *focus_surface;
|
||||
struct wl_listener focus_surface_listener;
|
||||
@@ -127,4 +132,8 @@ gboolean meta_wayland_pointer_can_popup (MetaWaylandPointer *pointer,
|
||||
|
||||
MetaWaylandSurface *meta_wayland_pointer_get_top_popup (MetaWaylandPointer *pointer);
|
||||
|
||||
MetaWaylandPointerClient * meta_wayland_pointer_get_pointer_client (MetaWaylandPointer *pointer,
|
||||
struct wl_client *client);
|
||||
void meta_wayland_pointer_unbind_pointer_client_resource (struct wl_resource *resource);
|
||||
|
||||
#endif /* META_WAYLAND_POINTER_H */
|
||||
|
Reference in New Issue
Block a user