compositor: Add window/grab_op getters to MetaWindowDrag

This will be useful in porting, since there's still places that
check the current grab operation, or check a window against the
currently dragged window.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho 2022-10-21 11:26:22 +02:00 committed by Marge Bot
parent fc4287cd20
commit db1c64fe06
2 changed files with 16 additions and 0 deletions

View File

@ -1783,3 +1783,15 @@ meta_window_drag_update_resize (MetaWindowDrag *window_drag)
window_drag->latest_motion_x,
window_drag->latest_motion_y);
}
MetaWindow *
meta_window_drag_get_window (MetaWindowDrag *window_drag)
{
return window_drag->effective_grab_window;
}
MetaGrabOp
meta_window_drag_get_grab_op (MetaWindowDrag *window_drag)
{
return window_drag->grab_op;
}

View File

@ -39,4 +39,8 @@ void meta_window_drag_end (MetaWindowDrag *drag);
void meta_window_drag_update_resize (MetaWindowDrag *drag);
MetaWindow * meta_window_drag_get_window (MetaWindowDrag *window_drag);
MetaGrabOp meta_window_drag_get_grab_op (MetaWindowDrag *window_drag);
#endif /* META_WINDOW_DRAG_H */