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 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2124>
This commit is contained in:
parent
62ab4c09d9
commit
e74e8061a4
@ -34,6 +34,7 @@
|
|||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/Xfixes.h>
|
#include <X11/extensions/Xfixes.h>
|
||||||
|
|
||||||
|
#include "core/meta-workspace-manager-private.h"
|
||||||
#include "meta/meta-x11-errors.h"
|
#include "meta/meta-x11-errors.h"
|
||||||
#include "wayland/meta-wayland-data-device.h"
|
#include "wayland/meta-wayland-data-device.h"
|
||||||
#include "wayland/meta-xwayland-private.h"
|
#include "wayland/meta-xwayland-private.h"
|
||||||
@ -635,12 +636,15 @@ pick_drop_surface (MetaWaylandCompositor *compositor,
|
|||||||
const ClutterEvent *event)
|
const ClutterEvent *event)
|
||||||
{
|
{
|
||||||
MetaDisplay *display = meta_get_display ();
|
MetaDisplay *display = meta_get_display ();
|
||||||
|
MetaWorkspaceManager *workspace_manager = display->workspace_manager;
|
||||||
|
MetaWorkspace *workspace = workspace_manager->active_workspace;
|
||||||
MetaWindow *focus_window = NULL;
|
MetaWindow *focus_window = NULL;
|
||||||
graphene_point_t pos;
|
graphene_point_t pos;
|
||||||
|
|
||||||
clutter_event_get_coords (event, &pos.x, &pos.y);
|
clutter_event_get_coords (event, &pos.x, &pos.y);
|
||||||
focus_window = meta_stack_get_default_focus_window_at_point (display->stack,
|
focus_window = meta_stack_get_default_focus_window_at_point (display->stack,
|
||||||
NULL, NULL,
|
workspace,
|
||||||
|
NULL,
|
||||||
pos.x, pos.y);
|
pos.x, pos.y);
|
||||||
return focus_window ? focus_window->surface : NULL;
|
return focus_window ? focus_window->surface : NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user