[mutter/wip/carlosg/xdnd-drop-focus: 1/2] wayland: Specify workspace when looking for Xdnd drop target
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/xdnd-drop-focus: 1/2] wayland: Specify workspace when looking for Xdnd drop target
- Date: Wed, 1 Dec 2021 14:40:25 +0000 (UTC)
commit 8b70b8d676c5c6f312b433ff6e9ceaa6b1a62dbe
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 1 12:23:34 2021 +0100
wayland: Specify workspace when looking for Xdnd drop target
The meta_stack_get_default_focus_window_at_point() function started silently
requiring a workspace, returning always NULL otherwise. Specify the current
workspace here.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2042
src/wayland/meta-xwayland-dnd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-xwayland-dnd.c b/src/wayland/meta-xwayland-dnd.c
index 2b096ef443..b3b94914d3 100644
--- a/src/wayland/meta-xwayland-dnd.c
+++ b/src/wayland/meta-xwayland-dnd.c
@@ -34,6 +34,7 @@
#include <X11/Xatom.h>
#include <X11/extensions/Xfixes.h>
+#include "core/meta-workspace-manager-private.h"
#include "meta/meta-x11-errors.h"
#include "wayland/meta-wayland-data-device.h"
#include "wayland/meta-xwayland-private.h"
@@ -635,12 +636,15 @@ pick_drop_surface (MetaWaylandCompositor *compositor,
const ClutterEvent *event)
{
MetaDisplay *display = meta_get_display ();
+ MetaWorkspaceManager *workspace_manager = display->workspace_manager;
+ MetaWorkspace *workspace = workspace_manager->active_workspace;
MetaWindow *focus_window = NULL;
graphene_point_t pos;
clutter_event_get_coords (event, &pos.x, &pos.y);
focus_window = meta_stack_get_default_focus_window_at_point (display->stack,
- NULL, NULL,
+ workspace,
+ NULL,
pos.x, pos.y);
return focus_window ? focus_window->surface : NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]