Deprecate gdk_display_put_event
authorMatthias Clasen <mclasen@redhat.com>
Mon, 9 Jan 2023 20:29:24 +0000 (15:29 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 9 Jan 2023 20:46:25 +0000 (15:46 -0500)
The documentation already tells you not to
use this function.

Ifdef the remaining users in the X11 backend.

gdk/gdkdisplay.c
gdk/gdkdisplay.h
gdk/x11/gdkdevicemanager-xi2.c
gdk/x11/gdkeventsource.c

index c7a2e6203b8a3566747767e1cf8f29a9e3d12467..66216a4401a4f118972e9e20cda601f96ec5ff7f 100644 (file)
@@ -471,8 +471,8 @@ gdk_display_get_event (GdkDisplay *display)
  * Appends the given event onto the front of the event
  * queue for @display.
  *
- * This function is only useful in very special situations
- * and should not be used by applications.
+ * Deprecated: 4.10: This function is only useful in very
+ * special situations and should not be used by applications.
  **/
 void
 gdk_display_put_event (GdkDisplay *display,
index 0a07221dc1932ed2ceb83b788e035487bcefb2d2..3ab938ae111d5c640f5e4486d15d28ddf08dc833 100644 (file)
@@ -104,7 +104,7 @@ GDK_AVAILABLE_IN_ALL
 GdkMonitor * gdk_display_get_monitor_at_surface (GdkDisplay *display,
                                                 GdkSurface  *surface);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void      gdk_display_put_event  (GdkDisplay     *display,
                                   GdkEvent       *event);
 
index 02ceb2f110a5824b285f8492bf38c5a42d8b3cdf..4f3d69fc83fb02a3b69f4b1e062c3bc518b20257 100644 (file)
@@ -1450,7 +1450,9 @@ _gdk_device_manager_xi2_handle_focus (GdkSurface *surface,
       GdkEvent *event;
 
       event = gdk_focus_event_new (surface, device, focus_in);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gdk_display_put_event (gdk_surface_get_display (surface), event);
+G_GNUC_END_IGNORE_DEPRECATIONS
       gdk_event_unref (event);
     }
 }
index 5a39a5b59562bbb4cab088ca809403af83037dbc..19fd9b9bfedebdf747d1ae4b7bde758d19fdbfa6 100644 (file)
@@ -119,7 +119,9 @@ handle_focus_change (GdkEvent *event)
       focus_event = gdk_focus_event_new (gdk_event_get_surface (event),
                                          gdk_event_get_device (event),
                                          focus_in);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gdk_display_put_event (gdk_event_get_display (event), focus_event);
+G_GNUC_END_IGNORE_DEPRECATIONS
       gdk_event_unref (focus_event);
     }
 }
@@ -206,7 +208,9 @@ handle_touch_synthetic_crossing (GdkEvent *event)
 
   if (crossing)
     {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gdk_display_put_event (gdk_seat_get_display (seat), crossing);
+G_GNUC_END_IGNORE_DEPRECATIONS
       gdk_event_unref (crossing);
     }
 }