From fecfeff6c34c1ac11c4803cb3ffc0b6722bd93b7 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 26 Jun 2016 20:45:02 +0200 Subject: Gtk+-3.20 eel-canvas: use GdkSeat operations Some GdkDisplay operations have been deprecated in GDK 3.20. This commit replaces the deprecated code in eel_canvas_item_grab() and eel_canvas_item_ungrab() functions with new GdkSeat operations. https://bugzilla.gnome.org/show_bug.cgi?id=762235 taken from: https://git.gnome.org/browse/nautilus/commit/?id=225f2cf --- eel/eel-canvas.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'eel/eel-canvas.h') diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h index f641087a..fcb4cb3d 100644 --- a/eel/eel-canvas.h +++ b/eel/eel-canvas.h @@ -250,25 +250,43 @@ extern "C" { */ void eel_canvas_item_hide (EelCanvasItem *item); +#if GTK_CHECK_VERSION(3, 20, 0) + /* Grab the seat for the specified item. Only the events in event_mask will be + * reported. If cursor is non-NULL, it will be used during the duration of the + * grab. event is the event, triggering the grab. Returns the same values as gdk_seat_grab(). + */ +#else /* Grab the mouse for the specified item. Only the events in event_mask will be * reported. If cursor is non-NULL, it will be used during the duration of the * grab. Time is a proper X event time parameter. Returns the same values as * XGrabPointer(). */ +#endif #if GTK_CHECK_VERSION (3, 0, 0) GdkGrabStatus eel_canvas_item_grab (EelCanvasItem *item, GdkEventMask event_mask, GdkCursor *cursor, +#if GTK_CHECK_VERSION(3, 20, 0) + const GdkEvent* event); +#else guint32 etime); +#endif #else int eel_canvas_item_grab (EelCanvasItem *item, unsigned int event_mask, GdkCursor *cursor, guint32 etime); #endif +#if GTK_CHECK_VERSION(3, 20, 0) + /* Ungrabs the seat -- the specified item must be the same that was passed to + * eel_canvas_item_grab(). + */ + void eel_canvas_item_ungrab (EelCanvasItem *item); +#else /* Ungrabs the mouse -- the specified item must be the same that was passed to * eel_canvas_item_grab(). Time is a proper X event time parameter. */ void eel_canvas_item_ungrab (EelCanvasItem *item, guint32 etime); +#endif /* These functions convert from a coordinate system to another. "w" is world * coordinates and "i" is item coordinates. -- cgit v1.2.1