xwayland: Refactor XFixesSelectionNotifyEvent handler
Prepare it for more selection atoms (i.e. XdndSelection) to come. https://bugzilla.gnome.org/show_bug.cgi?id=738312
This commit is contained in:
parent
f53eea2c1c
commit
b449ba942a
@ -765,16 +765,15 @@ meta_xwayland_selection_handle_xfixes_selection_notify (MetaWaylandCompositor *c
|
||||
if (!selection)
|
||||
return FALSE;
|
||||
|
||||
if (selection->selection_atom == gdk_x11_get_xatom_by_name ("CLIPBOARD"))
|
||||
{
|
||||
if (event->owner == None)
|
||||
{
|
||||
if (selection->source && selection->owner != selection->window)
|
||||
{
|
||||
/* An X client went away, clear the selection */
|
||||
if (selection->selection_atom == gdk_x11_get_xatom_by_name ("CLIPBOARD"))
|
||||
{
|
||||
meta_wayland_data_device_set_selection (&compositor->seat->data_device, NULL,
|
||||
wl_display_next_serial (compositor->wayland_display));
|
||||
}
|
||||
selection->source = NULL;
|
||||
}
|
||||
|
||||
@ -802,6 +801,7 @@ meta_xwayland_selection_handle_xfixes_selection_notify (MetaWaylandCompositor *c
|
||||
selection->timestamp);
|
||||
XFlush (xdisplay);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user