compositor: Forward window drag position hint across internals

Allow passing an argument to meta_compositor_drag_window() to pass
the hint. Unused so far.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3546>
This commit is contained in:
Carlos Garnacho 2024-01-25 16:39:11 +01:00
parent e4542a6495
commit 51e084ee8d
3 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,8 @@
#pragma once
#include <graphene.h>
#include "clutter/clutter-mutter.h"
#include "clutter/clutter.h"
#include "compositor/meta-compositor-view.h"
@ -76,7 +78,8 @@ gboolean meta_compositor_drag_window (MetaCompositor *compositor,
MetaGrabOp grab_op,
ClutterInputDevice *device,
ClutterEventSequence *sequence,
uint32_t timestamp);
uint32_t timestamp,
graphene_point_t *pos_hint);
MetaWindowDrag * meta_compositor_get_current_window_drag (MetaCompositor *compositor);

View File

@ -1571,7 +1571,8 @@ meta_compositor_drag_window (MetaCompositor *compositor,
MetaGrabOp grab_op,
ClutterInputDevice *device,
ClutterEventSequence *sequence,
uint32_t timestamp)
uint32_t timestamp,
graphene_point_t *pos_hint)
{
MetaCompositorPrivate *priv =
meta_compositor_get_instance_private (compositor);
@ -1582,6 +1583,9 @@ meta_compositor_drag_window (MetaCompositor *compositor,
window_drag = meta_window_drag_new (window, grab_op);
if (pos_hint)
meta_window_drag_set_position_hint (window_drag, pos_hint);
if (!meta_window_drag_begin (window_drag, device, sequence, timestamp))
return FALSE;

View File

@ -6087,7 +6087,8 @@ meta_window_begin_grab_op (MetaWindow *window,
return meta_compositor_drag_window (window->display->compositor,
window, op,
device, sequence,
timestamp);
timestamp,
NULL);
}
MetaStackLayer