[mutter] xwayland: Ensure we've got an owner when setting the X selection owner



commit 0b0ce4193f97d15c36a4d4795e01177dfde0df29
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon May 18 20:58:29 2015 +0200

    xwayland: Ensure we've got an owner when setting the X selection owner
    
    Otherwise we may end up claiming the X selection when there's no wayland
    selection owner.

 src/wayland/meta-xwayland-selection.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-xwayland-selection.c b/src/wayland/meta-xwayland-selection.c
index 2b40d8c..d7a5e69 100644
--- a/src/wayland/meta-xwayland-selection.c
+++ b/src/wayland/meta-xwayland-selection.c
@@ -847,10 +847,10 @@ meta_selection_bridge_ownership_notify (struct wl_listener *listener,
 
   if (!owner && selection->window == selection->owner)
     {
-        XSetSelectionOwner (xdisplay, selection->selection_atom,
-                            None, selection->timestamp);
+      XSetSelectionOwner (xdisplay, selection->selection_atom,
+                          None, selection->timestamp);
     }
-  else if (selection->source != owner)
+  else if (owner && selection->source != owner)
     {
       XSetSelectionOwner (xdisplay,
                           selection->selection_atom,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]