[mutter/gnome-3-22] xwayland: Check MetaDndBridge focus_window when updating X11 proxy window



commit 3378547aa2a0df9e31c276fd794a8037ab64580e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Mar 8 13:49:16 2017 +0100

    xwayland: Check MetaDndBridge focus_window when updating X11 proxy window
    
    We are keeping accounting of the focus window as seen by the DnD bridge
    right here, so use it instead of the MetaWaylandDragGrab focus as it may
    lag behind the real focus (i.e. till the drag source notices the window
    and sends XdndEnter to it).
    
    This leads to the window trying to be repositioned more often than
    necessary when the drag source takes long to send the XdndEnter client
    message, and maybe not repositioned at all if the pointer leaves the
    surface while no XdndEnter message was received.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763246

 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 f739eeb..af24586 100644
--- a/src/wayland/meta-xwayland-selection.c
+++ b/src/wayland/meta-xwayland-selection.c
@@ -1359,11 +1359,11 @@ repick_drop_surface (MetaWaylandCompositor *compositor,
   MetaWaylandSurface *focus = NULL;
 
   focus = pick_drop_surface (compositor, event);
-  dnd->focus_surface = focus;
-
-  if (meta_wayland_drag_grab_get_focus (drag_grab) == focus)
+  if (dnd->focus_surface == focus)
     return;
 
+  dnd->focus_surface = focus;
+
   if (focus &&
       focus->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
     {


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