mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Revert "wayland: Send primary offer to all data devices from the same client"
This reverts commit 493aeb65c8
.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1330
This commit is contained in:
parent
1f896c9735
commit
849d8dfae9
@ -1871,7 +1871,10 @@ owner_changed_cb (MetaSelection *selection,
|
|||||||
|
|
||||||
if (selection_type == META_SELECTION_PRIMARY)
|
if (selection_type == META_SELECTION_PRIMARY)
|
||||||
{
|
{
|
||||||
wl_resource_for_each (data_device_resource, &data_device->primary_focus_resource_list)
|
data_device_resource =
|
||||||
|
wl_resource_find_for_client (&data_device->primary_resource_list,
|
||||||
|
focus_client);
|
||||||
|
if (data_device_resource)
|
||||||
{
|
{
|
||||||
struct wl_resource *offer = NULL;
|
struct wl_resource *offer = NULL;
|
||||||
|
|
||||||
@ -2024,7 +2027,6 @@ meta_wayland_data_device_init (MetaWaylandDataDevice *data_device)
|
|||||||
wl_list_init (&data_device->resource_list);
|
wl_list_init (&data_device->resource_list);
|
||||||
wl_list_init (&data_device->focus_resource_list);
|
wl_list_init (&data_device->focus_resource_list);
|
||||||
wl_list_init (&data_device->primary_resource_list);
|
wl_list_init (&data_device->primary_resource_list);
|
||||||
wl_list_init (&data_device->primary_focus_resource_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct wl_resource *
|
static struct wl_resource *
|
||||||
@ -2108,8 +2110,6 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandDataDevice *data_device)
|
|||||||
data_device->focus_client = focus_client;
|
data_device->focus_client = focus_client;
|
||||||
move_resources (&data_device->resource_list,
|
move_resources (&data_device->resource_list,
|
||||||
&data_device->focus_resource_list);
|
&data_device->focus_resource_list);
|
||||||
move_resources (&data_device->primary_resource_list,
|
|
||||||
&data_device->primary_focus_resource_list);
|
|
||||||
|
|
||||||
if (!focus_client)
|
if (!focus_client)
|
||||||
return;
|
return;
|
||||||
@ -2126,14 +2126,10 @@ meta_wayland_data_device_set_keyboard_focus (MetaWaylandDataDevice *data_device)
|
|||||||
wl_data_device_send_selection (data_device_resource, offer);
|
wl_data_device_send_selection (data_device_resource, offer);
|
||||||
}
|
}
|
||||||
|
|
||||||
move_resources_for_client (&data_device->primary_focus_resource_list,
|
data_device_resource = wl_resource_find_for_client (&data_device->primary_resource_list, focus_client);
|
||||||
&data_device->primary_resource_list,
|
if (data_device_resource)
|
||||||
focus_client);
|
|
||||||
|
|
||||||
wl_resource_for_each (data_device_resource, &data_device->primary_focus_resource_list)
|
|
||||||
{
|
{
|
||||||
struct wl_resource *offer;
|
struct wl_resource *offer;
|
||||||
|
|
||||||
offer = create_and_send_primary_offer (data_device, data_device_resource);
|
offer = create_and_send_primary_offer (data_device, data_device_resource);
|
||||||
gtk_primary_selection_device_send_selection (data_device_resource, offer);
|
gtk_primary_selection_device_send_selection (data_device_resource, offer);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,6 @@ struct _MetaWaylandDataDevice
|
|||||||
struct wl_list resource_list;
|
struct wl_list resource_list;
|
||||||
struct wl_list focus_resource_list;
|
struct wl_list focus_resource_list;
|
||||||
struct wl_list primary_resource_list;
|
struct wl_list primary_resource_list;
|
||||||
struct wl_list primary_focus_resource_list;
|
|
||||||
MetaWaylandDragGrab *current_grab;
|
MetaWaylandDragGrab *current_grab;
|
||||||
struct wl_client *focus_client;
|
struct wl_client *focus_client;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user