[gtk/readonly-events-1: 50/51] Strip const from GdkEvent



commit f4990842a4737635bd38d000cb4606d261a33acd
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 16 11:09:02 2020 -0500

    Strip const from GdkEvent
    
    Events are refcounted structs, and we generally don't
    pass these as const.

 demos/gtk-demo/themes.c          |  2 +-
 gdk/gdkdisplay.c                 |  8 ++--
 gdk/gdkdisplay.h                 |  2 +-
 gdk/gdkdisplayprivate.h          |  6 +--
 gdk/gdkdragprivate.h             |  2 +-
 gdk/gdkevents.c                  | 80 ++++++++++++++++++++--------------------
 gdk/gdkevents.h                  | 76 +++++++++++++++++++-------------------
 gdk/gdkinternals.h               |  4 +-
 gdk/gdkseat.c                    |  2 +-
 gdk/gdkseatdefault.c             |  2 +-
 gdk/gdkseatprivate.h             |  2 +-
 gdk/wayland/gdkdevice-wayland.c  |  4 +-
 gdk/wayland/gdkprivate-wayland.h |  2 +-
 gdk/win32/gdkdrag-win32.c        | 10 ++---
 gdk/win32/gdkevents-win32.c      |  2 +-
 gdk/win32/gdkprivate-win32.h     |  2 +-
 gdk/x11/gdkdrag-x11.c            | 12 +++---
 gdk/x11/gdkeventsource.c         |  2 +-
 gtk/gtkdragdest.c                |  8 ++--
 gtk/gtkdragsource.c              |  2 +-
 gtk/gtkeventcontroller.c         |  8 ++--
 gtk/gtkeventcontroller.h         |  2 +-
 gtk/gtkeventcontrollerkey.c      |  4 +-
 gtk/gtkeventcontrollerlegacy.c   |  2 +-
 gtk/gtkeventcontrollermotion.c   |  4 +-
 gtk/gtkeventcontrollerprivate.h  |  4 +-
 gtk/gtkeventcontrollerscroll.c   |  2 +-
 gtk/gtkflowbox.c                 |  2 +-
 gtk/gtkgesture.c                 | 12 +++---
 gtk/gtkgesture.h                 |  2 +-
 gtk/gtkgestureclick.c            |  4 +-
 gtk/gtkgesturedrag.c             |  2 +-
 gtk/gtkgesturelongpress.c        |  2 +-
 gtk/gtkgesturerotate.c           |  6 +--
 gtk/gtkgesturesingle.c           |  2 +-
 gtk/gtkgesturestylus.c           | 12 +++---
 gtk/gtkgestureswipe.c            |  2 +-
 gtk/gtkgesturezoom.c             |  4 +-
 gtk/gtkiconview.c                |  6 +--
 gtk/gtklabel.c                   |  4 +-
 gtk/gtklinkbutton.c              |  2 +-
 gtk/gtklistbox.c                 |  2 +-
 gtk/gtkmain.c                    |  2 +-
 gtk/gtkmain.h                    |  2 +-
 gtk/gtkmountoperation.c          |  4 +-
 gtk/gtknotebook.c                |  4 +-
 gtk/gtkpadcontroller.c           |  4 +-
 gtk/gtkpaned.c                   |  2 +-
 gtk/gtkrange.c                   |  2 +-
 gtk/gtkscrolledwindow.c          |  2 +-
 gtk/gtktext.c                    |  6 +--
 gtk/gtktextview.c                | 14 +++----
 gtk/gtktreeview.c                |  4 +-
 gtk/gtkwidget.c                  | 18 ++++-----
 gtk/gtkwidgetprivate.h           |  2 +-
 gtk/gtkwindow.c                  |  4 +-
 56 files changed, 195 insertions(+), 195 deletions(-)
---
diff --git a/demos/gtk-demo/themes.c b/demos/gtk-demo/themes.c
index bfffc3a69a..1ad98b14e7 100644
--- a/demos/gtk-demo/themes.c
+++ b/demos/gtk-demo/themes.c
@@ -135,7 +135,7 @@ clicked (GtkGestureClick *gesture,
          gpointer data)
 {
   GtkWidget *window;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkModifierType state;
 
   window = gtk_widget_get_ancestor (gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)), 
GTK_TYPE_WINDOW);
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 8f9c176f7a..eb3826f48f 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -133,7 +133,7 @@ gdk_display_real_opened (GdkDisplay *display)
 
 static void
 gdk_display_real_event_data_copy (GdkDisplay     *display,
-                                  const GdkEvent *src,
+                                  GdkEvent       *src,
                                   GdkEvent       *dst)
 {
 }
@@ -484,7 +484,7 @@ gdk_display_peek_event (GdkDisplay *display)
  **/
 void
 gdk_display_put_event (GdkDisplay     *display,
-                      const GdkEvent *event)
+                      GdkEvent       *event)
 {
   g_return_if_fail (GDK_IS_DISPLAY (display));
   g_return_if_fail (event != NULL);
@@ -688,7 +688,7 @@ switch_to_pointer_grab (GdkDisplay        *display,
 
 void
 _gdk_display_update_last_event (GdkDisplay     *display,
-                                const GdkEvent *event)
+                                GdkEvent       *event)
 {
   if (gdk_event_get_time (event) != GDK_CURRENT_TIME)
     display->last_event_time = gdk_event_get_time (event);
@@ -1290,7 +1290,7 @@ _gdk_display_unpause_events (GdkDisplay *display)
 
 void
 _gdk_display_event_data_copy (GdkDisplay     *display,
-                              const GdkEvent *event,
+                              GdkEvent       *event,
                               GdkEvent       *new_event)
 {
   GDK_DISPLAY_GET_CLASS (display)->event_data_copy (display, event, new_event);
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index 34610aa51b..bdd6c985cb 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -72,7 +72,7 @@ GDK_AVAILABLE_IN_ALL
 GdkEvent* gdk_display_peek_event (GdkDisplay     *display);
 GDK_AVAILABLE_IN_ALL
 void      gdk_display_put_event  (GdkDisplay     *display,
-                                  const GdkEvent *event);
+                                  GdkEvent       *event);
 GDK_AVAILABLE_IN_ALL
 gboolean  gdk_display_has_pending (GdkDisplay  *display);
 
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index 8c8b76a8bc..2026daca7a 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -136,7 +136,7 @@ struct _GdkDisplayClass
   const gchar *              (*get_startup_notification_id) (GdkDisplay  *display);
 
   void                       (*event_data_copy) (GdkDisplay     *display,
-                                                 const GdkEvent *event,
+                                                 GdkEvent       *event,
                                                  GdkEvent       *new_event);
   void                       (*event_data_free) (GdkDisplay     *display,
                                                  GdkEvent       *event);
@@ -191,7 +191,7 @@ typedef void (* GdkDisplayPointerInfoForeach) (GdkDisplay           *display,
                                                gpointer              user_data);
 
 void                _gdk_display_update_last_event    (GdkDisplay     *display,
-                                                       const GdkEvent *event);
+                                                       GdkEvent       *event);
 void                _gdk_display_device_grab_update   (GdkDisplay *display,
                                                        GdkDevice  *device,
                                                        GdkDevice  *source_device,
@@ -227,7 +227,7 @@ gulong              _gdk_display_get_next_serial      (GdkDisplay       *display
 void                _gdk_display_pause_events         (GdkDisplay       *display);
 void                _gdk_display_unpause_events       (GdkDisplay       *display);
 void                _gdk_display_event_data_copy      (GdkDisplay       *display,
-                                                       const GdkEvent   *event,
+                                                       GdkEvent         *event,
                                                        GdkEvent         *new_event);
 void                _gdk_display_event_data_free      (GdkDisplay       *display,
                                                        GdkEvent         *event);
diff --git a/gdk/gdkdragprivate.h b/gdk/gdkdragprivate.h
index 76fd56bb19..ec781204d5 100644
--- a/gdk/gdkdragprivate.h
+++ b/gdk/gdkdragprivate.h
@@ -49,7 +49,7 @@ struct _GdkDragClass {
   void        (*dnd_finished)   (GdkDrag  *drag);
 
   gboolean    (*handle_event)   (GdkDrag  *drag,
-                                 const GdkEvent  *event);
+                                 GdkEvent  *event);
 };
 
 struct _GdkDrag {
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 4a06ce4c11..7864f7ac3c 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -265,7 +265,7 @@ _gdk_event_unqueue (GdkDisplay *display)
 
 static void
 gdk_event_push_history (GdkEvent       *event,
-                        const GdkEvent *history_event)
+                        GdkEvent       *history_event)
 {
   GdkTimeCoord *hist;
   GdkDevice *device;
@@ -468,7 +468,7 @@ gdk_event_free (GdkEvent *event)
  * Returns: (transfer none): The #GdkSurface associated with the event
  */
 GdkSurface *
-gdk_event_get_surface (const GdkEvent *event)
+gdk_event_get_surface (GdkEvent       *event)
 {
   g_return_val_if_fail (event != NULL, NULL);
 
@@ -485,7 +485,7 @@ gdk_event_get_surface (const GdkEvent *event)
  * Returns: time stamp field from @event
  **/
 guint32
-gdk_event_get_time (const GdkEvent *event)
+gdk_event_get_time (GdkEvent       *event)
 {
   if (event)
     switch (event->any.type)
@@ -555,7 +555,7 @@ gdk_event_get_time (const GdkEvent *event)
  * Returns: %TRUE if there was a state field in the event
  **/
 gboolean
-gdk_event_get_state (const GdkEvent  *event,
+gdk_event_get_state (GdkEvent        *event,
                      GdkModifierType *state)
 {
   g_return_val_if_fail (state != NULL, FALSE);
@@ -629,7 +629,7 @@ gdk_event_get_state (const GdkEvent  *event,
  * Returns: %TRUE if the event delivered event surface coordinates
  **/
 gboolean
-gdk_event_get_coords (const GdkEvent *event,
+gdk_event_get_coords (GdkEvent       *event,
                      gdouble        *x_win,
                      gdouble        *y_win)
 {
@@ -707,7 +707,7 @@ gdk_event_get_coords (const GdkEvent *event,
  * Returns: %TRUE if the event delivered a button number
  **/
 gboolean
-gdk_event_get_button (const GdkEvent *event,
+gdk_event_get_button (GdkEvent       *event,
                       guint *button)
 {
   gboolean fetched = TRUE;
@@ -746,7 +746,7 @@ gdk_event_get_button (const GdkEvent *event,
  * Returns: %TRUE if the event delivered a click count
  */
 gboolean
-gdk_event_get_click_count (const GdkEvent *event,
+gdk_event_get_click_count (GdkEvent       *event,
                            guint *click_count)
 {
   gboolean fetched = TRUE;
@@ -781,7 +781,7 @@ gdk_event_get_click_count (const GdkEvent *event,
  * Returns: %TRUE if the event delivered a key symbol
  */
 gboolean
-gdk_event_get_keyval (const GdkEvent *event,
+gdk_event_get_keyval (GdkEvent       *event,
                       guint *keyval)
 {
   gboolean fetched = TRUE;
@@ -816,7 +816,7 @@ gdk_event_get_keyval (const GdkEvent *event,
  * Returns: %TRUE if the event delivered a hardware keycode
  */
 gboolean
-gdk_event_get_keycode (const GdkEvent *event,
+gdk_event_get_keycode (GdkEvent       *event,
                        guint16 *keycode)
 {
   gboolean fetched = TRUE;
@@ -849,7 +849,7 @@ gdk_event_get_keycode (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_key_group (const GdkEvent *event,
+gdk_event_get_key_group (GdkEvent       *event,
                          guint          *group)
 {
   gboolean fetched = TRUE;
@@ -880,7 +880,7 @@ gdk_event_get_key_group (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_key_is_modifier (const GdkEvent *event,
+gdk_event_get_key_is_modifier (GdkEvent       *event,
                                gboolean       *is_modifier)
 {
   gboolean fetched = TRUE;
@@ -910,7 +910,7 @@ gdk_event_get_key_is_modifier (const GdkEvent *event,
  * Returns: %TRUE if the event delivered a scroll direction
  */
 gboolean
-gdk_event_get_scroll_direction (const GdkEvent *event,
+gdk_event_get_scroll_direction (GdkEvent       *event,
                                 GdkScrollDirection *direction)
 {
   gboolean fetched = TRUE;
@@ -946,7 +946,7 @@ gdk_event_get_scroll_direction (const GdkEvent *event,
  * Returns: %TRUE if the event contains smooth scroll information
  **/
 gboolean
-gdk_event_get_scroll_deltas (const GdkEvent *event,
+gdk_event_get_scroll_deltas (GdkEvent       *event,
                              gdouble        *delta_x,
                              gdouble        *delta_y)
 {
@@ -994,7 +994,7 @@ gdk_event_get_scroll_deltas (const GdkEvent *event,
  * Returns: %TRUE if the event is a scroll stop event
  */
 gboolean
-gdk_event_is_scroll_stop_event (const GdkEvent *event)
+gdk_event_is_scroll_stop_event (GdkEvent       *event)
 {
   return event->scroll.is_stop;
 }
@@ -1011,7 +1011,7 @@ gdk_event_is_scroll_stop_event (const GdkEvent *event)
  * Returns: %TRUE if the specified axis was found, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_axis (const GdkEvent *event,
+gdk_event_get_axis (GdkEvent       *event,
                    GdkAxisUse      axis_use,
                    gdouble        *value)
 {
@@ -1093,7 +1093,7 @@ gdk_event_get_axis (const GdkEvent *event,
  * Returns: (nullable) (transfer none): a #GdkDevice, or %NULL.
  **/
 GdkDevice *
-gdk_event_get_device (const GdkEvent *event)
+gdk_event_get_device (GdkEvent       *event)
 {
   g_return_val_if_fail (event != NULL, NULL);
 
@@ -1117,7 +1117,7 @@ gdk_event_get_device (const GdkEvent *event)
  * Returns: (nullable) (transfer none): a #GdkDevice, or %NULL.
  **/
 GdkDevice *
-gdk_event_get_source_device (const GdkEvent *event)
+gdk_event_get_source_device (GdkEvent       *event)
 {
   g_return_val_if_fail (event != NULL, NULL);
 
@@ -1145,13 +1145,13 @@ gdk_event_get_source_device (const GdkEvent *event)
  * Returns: %TRUE if the event should trigger a context menu.
  **/
 gboolean
-gdk_event_triggers_context_menu (const GdkEvent *event)
+gdk_event_triggers_context_menu (GdkEvent       *event)
 {
   g_return_val_if_fail (event != NULL, FALSE);
 
   if (event->any.type == GDK_BUTTON_PRESS)
     {
-      const GdkEventButton *bevent = (const GdkEventButton *) event;
+      GdkEventButton *bevent = (GdkEventButton *) event;
       GdkDisplay *display;
       GdkModifierType modifier;
 
@@ -1310,7 +1310,7 @@ gdk_events_get_center (GdkEvent *event1,
  * Returns: (transfer none) (nullable): a #GdkDisplay
  */
 GdkDisplay *
-gdk_event_get_display (const GdkEvent *event)
+gdk_event_get_display (GdkEvent       *event)
 {
   if (event->any.display)
     return event->any.display;
@@ -1332,7 +1332,7 @@ gdk_event_get_display (const GdkEvent *event)
  * Returns: (transfer none): the event sequence that the event belongs to
  */
 GdkEventSequence *
-gdk_event_get_event_sequence (const GdkEvent *event)
+gdk_event_get_event_sequence (GdkEvent       *event)
 {
   if (!event)
     return NULL;
@@ -1402,7 +1402,7 @@ G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
  * Returns: a #GdkEventType
  */
 GdkEventType
-gdk_event_get_event_type (const GdkEvent *event)
+gdk_event_get_event_type (GdkEvent       *event)
 {
   g_return_val_if_fail (event != NULL, 0);
 
@@ -1418,7 +1418,7 @@ gdk_event_get_event_type (const GdkEvent *event)
  * Returns: (transfer none): The #GdkSeat of this event
  **/
 GdkSeat *
-gdk_event_get_seat (const GdkEvent *event)
+gdk_event_get_seat (GdkEvent       *event)
 {
   GdkDevice *device;
 
@@ -1443,7 +1443,7 @@ gdk_event_get_seat (const GdkEvent *event)
  * Returns: (transfer none): The current device tool, or %NULL
  **/
 GdkDeviceTool *
-gdk_event_get_device_tool (const GdkEvent *event)
+gdk_event_get_device_tool (GdkEvent       *event)
 {
   if (event->any.type == GDK_BUTTON_PRESS ||
       event->any.type == GDK_BUTTON_RELEASE)
@@ -1490,7 +1490,7 @@ gdk_event_get_scancode (GdkEvent *event)
  * Returns: %TRUE if the event was sent explicitly
  */
 gboolean
-gdk_event_is_sent (const GdkEvent *event)
+gdk_event_is_sent (GdkEvent       *event)
 {
   if (!event)
     return FALSE;
@@ -1507,7 +1507,7 @@ gdk_event_is_sent (const GdkEvent *event)
  * Returns: (transfer none) (nullable): the drop
  **/
 GdkDrop *
-gdk_event_get_drop (const GdkEvent *event)
+gdk_event_get_drop (GdkEvent       *event)
 {
   if (!event)
     return FALSE;
@@ -1533,7 +1533,7 @@ gdk_event_get_drop (const GdkEvent *event)
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_crossing_mode (const GdkEvent  *event,
+gdk_event_get_crossing_mode (GdkEvent        *event,
                              GdkCrossingMode *mode)
 {
   if (!event)
@@ -1564,7 +1564,7 @@ gdk_event_get_crossing_mode (const GdkEvent  *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_crossing_detail (const GdkEvent *event,
+gdk_event_get_crossing_detail (GdkEvent       *event,
                                GdkNotifyType  *detail)
 {
   if (!event)
@@ -1595,7 +1595,7 @@ gdk_event_get_crossing_detail (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_touchpad_gesture_phase (const GdkEvent          *event,
+gdk_event_get_touchpad_gesture_phase (GdkEvent                *event,
                                       GdkTouchpadGesturePhase *phase)
 {
   if (!event)
@@ -1625,7 +1625,7 @@ gdk_event_get_touchpad_gesture_phase (const GdkEvent          *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_touchpad_gesture_n_fingers (const GdkEvent *event,
+gdk_event_get_touchpad_gesture_n_fingers (GdkEvent       *event,
                                           guint          *n_fingers)
 {
   if (!event)
@@ -1656,7 +1656,7 @@ gdk_event_get_touchpad_gesture_n_fingers (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_touchpad_deltas (const GdkEvent *event,
+gdk_event_get_touchpad_deltas (GdkEvent       *event,
                                double         *dx,
                                double         *dy)
 {
@@ -1689,7 +1689,7 @@ gdk_event_get_touchpad_deltas (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_touchpad_angle_delta (const GdkEvent *event,
+gdk_event_get_touchpad_angle_delta (GdkEvent       *event,
                                     double         *delta)
 {
   if (!event)
@@ -1714,7 +1714,7 @@ gdk_event_get_touchpad_angle_delta (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_touchpad_scale (const GdkEvent *event,
+gdk_event_get_touchpad_scale (GdkEvent       *event,
                               double         *scale)
 {
   if (!event)
@@ -1739,7 +1739,7 @@ gdk_event_get_touchpad_scale (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
+gdk_event_get_touch_emulating_pointer (GdkEvent       *event,
                                        gboolean       *emulating)
 {
   if (!event)
@@ -1766,7 +1766,7 @@ gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_grab_surface (const GdkEvent  *event,
+gdk_event_get_grab_surface (GdkEvent        *event,
                             GdkSurface     **surface)
 {
   if (!event)
@@ -1791,7 +1791,7 @@ gdk_event_get_grab_surface (const GdkEvent  *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_focus_in (const GdkEvent *event,
+gdk_event_get_focus_in (GdkEvent       *event,
                         gboolean       *focus_in)
 {
   if (!event)
@@ -1817,7 +1817,7 @@ gdk_event_get_focus_in (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_pad_group_mode (const GdkEvent *event,
+gdk_event_get_pad_group_mode (GdkEvent       *event,
                               guint          *group,
                               guint          *mode)
 {
@@ -1859,7 +1859,7 @@ gdk_event_get_pad_group_mode (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_pad_button (const GdkEvent *event,
+gdk_event_get_pad_button (GdkEvent       *event,
                           guint          *button)
 {
   if (!event)
@@ -1886,7 +1886,7 @@ gdk_event_get_pad_button (const GdkEvent *event,
  * Returns: %TRUE on success, otherwise %FALSE
  **/
 gboolean
-gdk_event_get_pad_axis_value (const GdkEvent *event,
+gdk_event_get_pad_axis_value (GdkEvent       *event,
                               guint          *index,
                               gdouble        *value)
 {
@@ -1957,7 +1957,7 @@ gdk_event_get_axes (GdkEvent  *event,
  *   of time and coordinates
  */
 GList *
-gdk_event_get_motion_history (const GdkEvent *event)
+gdk_event_get_motion_history (GdkEvent       *event)
 {
   if (event->any.type != GDK_MOTION_NOTIFY)
     return NULL;
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 66afe79796..b574044ccd 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -341,58 +341,58 @@ GDK_AVAILABLE_IN_ALL
 void       gdk_event_unref (GdkEvent *event);
 
 GDK_AVAILABLE_IN_ALL
-GdkSurface *gdk_event_get_surface       (const GdkEvent *event);
+GdkSurface *gdk_event_get_surface       (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
-guint32   gdk_event_get_time            (const GdkEvent  *event);
+guint32   gdk_event_get_time            (GdkEvent        *event);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_state           (const GdkEvent  *event,
+gboolean  gdk_event_get_state           (GdkEvent        *event,
                                          GdkModifierType *state);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_coords         (const GdkEvent  *event,
+gboolean  gdk_event_get_coords         (GdkEvent        *event,
                                         gdouble         *x_win,
                                         gdouble         *y_win);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_button          (const GdkEvent *event,
+gboolean  gdk_event_get_button          (GdkEvent       *event,
                                          guint          *button);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_click_count     (const GdkEvent *event,
+gboolean  gdk_event_get_click_count     (GdkEvent       *event,
                                          guint          *click_count);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_keyval          (const GdkEvent *event,
+gboolean  gdk_event_get_keyval          (GdkEvent       *event,
                                          guint          *keyval);
 
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_keycode         (const GdkEvent *event,
+gboolean  gdk_event_get_keycode         (GdkEvent       *event,
                                          guint16        *keycode);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_key_is_modifier (const GdkEvent *event,
+gboolean  gdk_event_get_key_is_modifier (GdkEvent       *event,
                                          gboolean       *is_modifier);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_key_group       (const GdkEvent *event,
+gboolean  gdk_event_get_key_group       (GdkEvent       *event,
                                          guint          *group);
 
 GDK_AVAILABLE_IN_ALL
-gboolean gdk_event_get_scroll_direction (const GdkEvent *event,
+gboolean gdk_event_get_scroll_direction (GdkEvent       *event,
                                          GdkScrollDirection *direction);
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_scroll_deltas   (const GdkEvent *event,
+gboolean  gdk_event_get_scroll_deltas   (GdkEvent       *event,
                                          gdouble         *delta_x,
                                          gdouble         *delta_y);
 
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_is_scroll_stop_event (const GdkEvent *event);
+gboolean  gdk_event_is_scroll_stop_event (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
-gboolean  gdk_event_get_axis            (const GdkEvent  *event,
+gboolean  gdk_event_get_axis            (GdkEvent        *event,
                                          GdkAxisUse       axis_use,
                                          gdouble         *value);
 GDK_AVAILABLE_IN_ALL
-GdkDevice* gdk_event_get_device         (const GdkEvent  *event);
+GdkDevice* gdk_event_get_device         (GdkEvent        *event);
 GDK_AVAILABLE_IN_ALL
-GdkDevice* gdk_event_get_source_device  (const GdkEvent  *event);
+GdkDevice* gdk_event_get_source_device  (GdkEvent        *event);
 GDK_AVAILABLE_IN_ALL
-gboolean   gdk_event_triggers_context_menu (const GdkEvent *event);
+gboolean   gdk_event_triggers_context_menu (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
 gboolean  gdk_events_get_distance       (GdkEvent        *event1,
@@ -408,16 +408,16 @@ gboolean  gdk_events_get_center         (GdkEvent        *event1,
                                          gdouble         *x,
                                          gdouble         *y);
 GDK_AVAILABLE_IN_ALL
-GdkDisplay *gdk_event_get_display       (const GdkEvent  *event);
+GdkDisplay *gdk_event_get_display       (GdkEvent        *event);
 
 GDK_AVAILABLE_IN_ALL
-GdkEventSequence *gdk_event_get_event_sequence (const GdkEvent *event);
+GdkEventSequence *gdk_event_get_event_sequence (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
-GdkEventType gdk_event_get_event_type   (const GdkEvent *event);
+GdkEventType gdk_event_get_event_type   (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
-GdkSeat  *gdk_event_get_seat            (const GdkEvent *event);
+GdkSeat  *gdk_event_get_seat            (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
 void     gdk_set_show_events           (gboolean        show_events);
@@ -425,7 +425,7 @@ GDK_AVAILABLE_IN_ALL
 gboolean  gdk_get_show_events          (void);
 
 GDK_AVAILABLE_IN_ALL
-GdkDeviceTool *gdk_event_get_device_tool (const GdkEvent *event);
+GdkDeviceTool *gdk_event_get_device_tool (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
 int            gdk_event_get_scancode    (GdkEvent *event);
@@ -434,52 +434,52 @@ GDK_AVAILABLE_IN_ALL
 gboolean       gdk_event_get_pointer_emulated (GdkEvent *event);
 
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_is_sent       (const GdkEvent *event);
+gboolean       gdk_event_is_sent       (GdkEvent       *event);
 
 GDK_AVAILABLE_IN_ALL
-GdkDrop *      gdk_event_get_drop (const GdkEvent  *event);
+GdkDrop *      gdk_event_get_drop (GdkEvent        *event);
 
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_crossing_mode (const GdkEvent  *event,
+gboolean       gdk_event_get_crossing_mode (GdkEvent        *event,
                                             GdkCrossingMode *mode);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_crossing_detail (const GdkEvent *event,
+gboolean       gdk_event_get_crossing_detail (GdkEvent       *event,
                                               GdkNotifyType  *detail);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_touchpad_gesture_phase (const GdkEvent          *event,
+gboolean       gdk_event_get_touchpad_gesture_phase (GdkEvent                *event,
                                                      GdkTouchpadGesturePhase *phase);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_touchpad_gesture_n_fingers (const GdkEvent *event,
+gboolean       gdk_event_get_touchpad_gesture_n_fingers (GdkEvent       *event,
                                                          guint          *n_fingers);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_touchpad_deltas (const GdkEvent *event,
+gboolean       gdk_event_get_touchpad_deltas (GdkEvent       *event,
                                               double         *dx,
                                               double         *dy);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_touchpad_angle_delta (const GdkEvent *event,
+gboolean       gdk_event_get_touchpad_angle_delta (GdkEvent       *event,
                                                    double         *delta);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_touchpad_scale (const GdkEvent *event,
+gboolean       gdk_event_get_touchpad_scale (GdkEvent       *event,
                                              double         *scale);
 
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
+gboolean       gdk_event_get_touch_emulating_pointer (GdkEvent       *event,
                                                       gboolean       *emulating);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_grab_surface (const GdkEvent  *event,
+gboolean       gdk_event_get_grab_surface (GdkEvent        *event,
                                            GdkSurface      **surface);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_focus_in (const GdkEvent *event,
+gboolean       gdk_event_get_focus_in (GdkEvent       *event,
                                        gboolean       *focus_in);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_pad_group_mode (const GdkEvent *event,
+gboolean       gdk_event_get_pad_group_mode (GdkEvent       *event,
                                              guint          *group,
                                              guint          *mode);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_pad_button (const GdkEvent *event,
+gboolean       gdk_event_get_pad_button (GdkEvent       *event,
                                          guint          *button);
 GDK_AVAILABLE_IN_ALL
-gboolean       gdk_event_get_pad_axis_value (const GdkEvent *event,
+gboolean       gdk_event_get_pad_axis_value (GdkEvent       *event,
                                              guint          *index,
                                              gdouble        *value);
 GDK_AVAILABLE_IN_ALL
@@ -487,7 +487,7 @@ gboolean       gdk_event_get_axes      (GdkEvent  *event,
                                         gdouble  **axes,
                                         guint     *n_axes);
 GDK_AVAILABLE_IN_ALL
-GList        * gdk_event_get_motion_history (const GdkEvent  *event);
+GList        * gdk_event_get_motion_history (GdkEvent        *event);
 
 G_END_DECLS
 
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 25b2d8d5ae..ebe529c654 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -143,7 +143,7 @@ void    _gdk_event_queue_flush                     (GdkDisplay       *display);
 void   _gdk_event_button_generate    (GdkDisplay *display,
                                       GdkEvent   *event);
 
-void _gdk_windowing_event_data_copy (const GdkEvent *src,
+void _gdk_windowing_event_data_copy (GdkEvent       *src,
                                      GdkEvent       *dst);
 void _gdk_windowing_event_data_free (GdkEvent       *event);
 
@@ -266,7 +266,7 @@ GdkGrabStatus  gdk_seat_grab             (GdkSeat                *seat,
                                           GdkSeatCapabilities     capabilities,
                                           gboolean                owner_events,
                                           GdkCursor              *cursor,
-                                          const GdkEvent         *event,
+                                          GdkEvent               *event,
                                           GdkSeatGrabPrepareFunc  prepare_func,
                                           gpointer                prepare_func_data);
 void           gdk_seat_ungrab           (GdkSeat                *seat);
diff --git a/gdk/gdkseat.c b/gdk/gdkseat.c
index 70bc02332d..bd29ddba34 100644
--- a/gdk/gdkseat.c
+++ b/gdk/gdkseat.c
@@ -286,7 +286,7 @@ gdk_seat_grab (GdkSeat                *seat,
                GdkSeatCapabilities     capabilities,
                gboolean                owner_events,
                GdkCursor              *cursor,
-               const GdkEvent         *event,
+               GdkEvent               *event,
                GdkSeatGrabPrepareFunc  prepare_func,
                gpointer                prepare_func_data)
 {
diff --git a/gdk/gdkseatdefault.c b/gdk/gdkseatdefault.c
index 17253f2ac5..5b1a8425e8 100644
--- a/gdk/gdkseatdefault.c
+++ b/gdk/gdkseatdefault.c
@@ -109,7 +109,7 @@ gdk_seat_default_grab (GdkSeat                *seat,
                        GdkSeatCapabilities     capabilities,
                        gboolean                owner_events,
                        GdkCursor              *cursor,
-                       const GdkEvent         *event,
+                       GdkEvent               *event,
                        GdkSeatGrabPrepareFunc  prepare_func,
                        gpointer                prepare_func_data)
 {
diff --git a/gdk/gdkseatprivate.h b/gdk/gdkseatprivate.h
index eaeecec8ff..ed7a87ec7a 100644
--- a/gdk/gdkseatprivate.h
+++ b/gdk/gdkseatprivate.h
@@ -46,7 +46,7 @@ struct _GdkSeatClass
                             GdkSeatCapabilities     capabilities,
                             gboolean                owner_events,
                             GdkCursor              *cursor,
-                            const GdkEvent         *event,
+                            GdkEvent               *event,
                             GdkSeatGrabPrepareFunc  prepare_func,
                             gpointer                prepare_func_data);
   void          (* ungrab) (GdkSeat                *seat);
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 53989aef9f..5935a6b9e1 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -4463,7 +4463,7 @@ gdk_wayland_seat_grab (GdkSeat                *seat,
                        GdkSeatCapabilities     capabilities,
                        gboolean                owner_events,
                        GdkCursor              *cursor,
-                       const GdkEvent         *event,
+                       GdkEvent               *event,
                        GdkSeatGrabPrepareFunc  prepare_func,
                        gpointer                prepare_func_data)
 {
@@ -4834,7 +4834,7 @@ _gdk_wayland_display_remove_seat (GdkWaylandDisplay *display_wayland,
 
 uint32_t
 _gdk_wayland_device_get_implicit_grab_serial (GdkWaylandDevice *device,
-                                              const GdkEvent   *event)
+                                              GdkEvent         *event)
 {
   GdkSeat *seat = gdk_device_get_seat (GDK_DEVICE (device));
   GdkEventSequence *sequence = NULL;
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index 8130a323a1..4cb15cb2be 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -138,7 +138,7 @@ void        _gdk_wayland_display_remove_seat    (GdkWaylandDisplay       *displa
 
 GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
 uint32_t _gdk_wayland_device_get_implicit_grab_serial(GdkWaylandDevice *device,
-                                                      const GdkEvent   *event);
+                                                      GdkEvent   *event);
 uint32_t _gdk_wayland_seat_get_last_implicit_grab_serial (GdkWaylandSeat     *seat,
                                                           GdkEventSequence **seqence);
 struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_device);
diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c
index f8e1ce7648..9eadebe3f8 100644
--- a/gdk/win32/gdkdrag-win32.c
+++ b/gdk/win32/gdkdrag-win32.c
@@ -2332,7 +2332,7 @@ gdk_local_drag_update (GdkDrag *drag,
 
 static gboolean
 gdk_dnd_handle_motion_event (GdkDrag              *drag,
-                             const GdkEventMotion *event)
+                             GdkEventMotion *event)
 {
   GdkModifierType state;
   GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
@@ -2375,7 +2375,7 @@ gdk_dnd_handle_motion_event (GdkDrag              *drag,
 
 static gboolean
 gdk_dnd_handle_key_event (GdkDrag           *drag,
-                          const GdkEventKey *event)
+                          GdkEventKey *event)
 {
   GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
   GdkModifierType state;
@@ -2460,7 +2460,7 @@ gdk_dnd_handle_key_event (GdkDrag           *drag,
 
 static gboolean
 gdk_dnd_handle_grab_broken_event (GdkDrag                  *drag,
-                                  const GdkEventGrabBroken *event)
+                                  GdkEventGrabBroken *event)
 {
   GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
 
@@ -2486,7 +2486,7 @@ gdk_dnd_handle_grab_broken_event (GdkDrag                  *drag,
 
 static gboolean
 gdk_dnd_handle_button_event (GdkDrag              *drag,
-                             const GdkEventButton *event)
+                             GdkEventButton *event)
 {
   GDK_NOTE (DND, g_print ("gdk_dnd_handle_button_event: 0x%p\n",
                           drag));
@@ -2510,7 +2510,7 @@ gdk_dnd_handle_button_event (GdkDrag              *drag,
 
 gboolean
 gdk_win32_drag_handle_event (GdkDrag        *drag,
-                             const GdkEvent *event)
+                             GdkEvent *event)
 {
   GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
 
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index c14efa9bd3..1b8f4cae91 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -755,7 +755,7 @@ print_event_state (guint state)
 }
 
 void
-_gdk_win32_print_event (const GdkEvent *event)
+_gdk_win32_print_event (GdkEvent *event)
 {
   const char *kvname;
 
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index e40b7867f2..d3377bbf34 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -236,7 +236,7 @@ gchar *_gdk_win32_rect_to_string       (const RECT  *rect);
 gchar *_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect);
 gchar *_gdk_win32_cairo_region_to_string (const cairo_region_t    *box);
 
-void   _gdk_win32_print_event            (const GdkEvent     *event);
+void   _gdk_win32_print_event            (GdkEvent     *event);
 
 #endif
 
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index 577037be72..313aac0ed0 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -171,7 +171,7 @@ static GdkSurfaceCache *gdk_surface_cache_ref   (GdkSurfaceCache *cache);
 static void            gdk_surface_cache_unref (GdkSurfaceCache *cache);
 
 gboolean gdk_x11_drag_handle_event   (GdkDrag        *drag,
-                                      const GdkEvent *event);
+                                      GdkEvent       *event);
 
 static GList *drags;
 static GSList *window_caches;
@@ -2242,7 +2242,7 @@ gdk_drag_update (GdkDrag         *drag,
 
 static gboolean
 gdk_dnd_handle_motion_event (GdkDrag        *drag,
-                             const GdkEvent *event)
+                             GdkEvent       *event)
 {
   GdkModifierType state;
   int x_root, y_root;
@@ -2259,7 +2259,7 @@ gdk_dnd_handle_motion_event (GdkDrag        *drag,
 
 static gboolean
 gdk_dnd_handle_key_event (GdkDrag           *drag,
-                          const GdkEventKey *event)
+                          GdkEventKey       *event)
 {
   GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
   GdkModifierType state;
@@ -2352,7 +2352,7 @@ gdk_dnd_handle_key_event (GdkDrag           *drag,
 
 static gboolean
 gdk_dnd_handle_grab_broken_event (GdkDrag                  *drag,
-                                  const GdkEventGrabBroken *event)
+                                  GdkEventGrabBroken       *event)
 {
   GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
 
@@ -2375,7 +2375,7 @@ gdk_dnd_handle_grab_broken_event (GdkDrag                  *drag,
 
 static gboolean
 gdk_dnd_handle_button_event (GdkDrag              *drag,
-                             const GdkEventButton *event)
+                             GdkEventButton       *event)
 {
   GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
 
@@ -2398,7 +2398,7 @@ gdk_dnd_handle_button_event (GdkDrag              *drag,
 
 gboolean
 gdk_x11_drag_handle_event (GdkDrag        *drag,
-                           const GdkEvent *event)
+                           GdkEvent       *event)
 {
   GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
 
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index f15cba480b..828313100a 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -127,7 +127,7 @@ handle_focus_change (GdkEventCrossing *event)
 static GdkEvent *
 create_synth_crossing_event (GdkEventType     evtype,
                              GdkCrossingMode  mode,
-                             const GdkEvent  *real_event)
+                             GdkEvent        *real_event)
 {
   GdkEvent *event;
   gdouble x, y;
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index a90c7d6b5a..708a90b97f 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -117,11 +117,11 @@ static gboolean gtk_drop_target_accept (GtkDropTarget *dest,
                                         GdkDrop       *drop);
 
 static gboolean gtk_drop_target_handle_event (GtkEventController *controller,
-                                              const GdkEvent     *event,
+                                              GdkEvent           *event,
                                               double              x,
                                               double              y);
 static gboolean gtk_drop_target_filter_event (GtkEventController *controller,
-                                              const GdkEvent     *event);
+                                              GdkEvent           *event);
 static void     gtk_drop_target_set_widget   (GtkEventController *controller,
                                               GtkWidget          *widget);
 static void     gtk_drop_target_unset_widget (GtkEventController *controller);
@@ -667,7 +667,7 @@ gtk_drop_target_get_contains (GtkDropTarget *dest)
 
 static gboolean
 gtk_drop_target_filter_event (GtkEventController *controller,
-                              const GdkEvent     *event)
+                              GdkEvent           *event)
 {
   switch ((int)gdk_event_get_event_type (event))
     {
@@ -749,7 +749,7 @@ gtk_drop_set_current_dest (GdkDrop       *drop,
 
 static gboolean
 gtk_drop_target_handle_event (GtkEventController *controller,
-                              const GdkEvent     *event,
+                              GdkEvent           *event,
                               double              x,
                               double              y)
 {
diff --git a/gtk/gtkdragsource.c b/gtk/gtkdragsource.c
index cda9754b54..2de0dcc5e6 100644
--- a/gtk/gtkdragsource.c
+++ b/gtk/gtkdragsource.c
@@ -198,7 +198,7 @@ gtk_drag_source_get_property (GObject    *object,
 
 static gboolean
 gtk_drag_source_filter_event (GtkEventController *controller,
-                              const GdkEvent     *event)
+                              GdkEvent           *event)
 {
   /* Let touchpad swipe events go through, only if they match n-points  */
   if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)
diff --git a/gtk/gtkeventcontroller.c b/gtk/gtkeventcontroller.c
index c58d986211..0bb86a59ce 100644
--- a/gtk/gtkeventcontroller.c
+++ b/gtk/gtkeventcontroller.c
@@ -82,14 +82,14 @@ gtk_event_controller_unset_widget (GtkEventController *self)
 
 static gboolean
 gtk_event_controller_filter_event_default (GtkEventController *self,
-                                           const GdkEvent     *event)
+                                           GdkEvent           *event)
 {
   return FALSE;
 }
 
 static gboolean
 gtk_event_controller_handle_event_default (GtkEventController *self,
-                                           const GdkEvent     *event,
+                                           GdkEvent           *event,
                                            double              x,
                                            double              y)
 {
@@ -263,7 +263,7 @@ same_native (GtkWidget *widget,
 
 static gboolean
 gtk_event_controller_filter_event (GtkEventController *controller,
-                                   const GdkEvent     *event,
+                                   GdkEvent           *event,
                                    GtkWidget          *target)
 {
   GtkEventControllerPrivate *priv;
@@ -318,7 +318,7 @@ gtk_event_controller_filter_crossing (GtkEventController    *controller,
  **/
 gboolean
 gtk_event_controller_handle_event (GtkEventController *controller,
-                                   const GdkEvent     *event,
+                                   GdkEvent           *event,
                                    GtkWidget          *target,
                                    double              x,
                                    double              y)
diff --git a/gtk/gtkeventcontroller.h b/gtk/gtkeventcontroller.h
index 2ca16342a7..38569453f1 100644
--- a/gtk/gtkeventcontroller.h
+++ b/gtk/gtkeventcontroller.h
@@ -76,7 +76,7 @@ GtkWidget  * gtk_event_controller_get_widget     (GtkEventController *controller
 
 GDK_AVAILABLE_IN_ALL
 gboolean     gtk_event_controller_handle_event   (GtkEventController *controller,
-                                                  const GdkEvent     *event,
+                                                  GdkEvent           *event,
                                                   GtkWidget          *target,
                                                   double              x,
                                                   double              y);
diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c
index 51d1185cc1..5c6765b222 100644
--- a/gtk/gtkeventcontrollerkey.c
+++ b/gtk/gtkeventcontrollerkey.c
@@ -50,7 +50,7 @@ struct _GtkEventControllerKey
 
   GdkModifierType state;
 
-  const GdkEvent *current_event;
+  GdkEvent *current_event;
   const GtkCrossingData *current_crossing;
 
   guint is_focus       : 1;
@@ -97,7 +97,7 @@ gtk_event_controller_key_finalize (GObject *object)
 
 static gboolean
 gtk_event_controller_key_handle_event (GtkEventController *controller,
-                                       const GdkEvent     *event,
+                                       GdkEvent           *event,
                                        double              x,
                                        double              y)
 {
diff --git a/gtk/gtkeventcontrollerlegacy.c b/gtk/gtkeventcontrollerlegacy.c
index c771d98f96..890b43046a 100644
--- a/gtk/gtkeventcontrollerlegacy.c
+++ b/gtk/gtkeventcontrollerlegacy.c
@@ -59,7 +59,7 @@ G_DEFINE_TYPE (GtkEventControllerLegacy, gtk_event_controller_legacy,
 
 static gboolean
 gtk_event_controller_legacy_handle_event (GtkEventController *controller,
-                                          const GdkEvent     *event,
+                                          GdkEvent           *event,
                                           double              x,
                                           double              y)
 {
diff --git a/gtk/gtkeventcontrollermotion.c b/gtk/gtkeventcontrollermotion.c
index 54b158dbd3..4134ce1335 100644
--- a/gtk/gtkeventcontrollermotion.c
+++ b/gtk/gtkeventcontrollermotion.c
@@ -41,7 +41,7 @@ struct _GtkEventControllerMotion
 {
   GtkEventController parent_instance;
 
-  const GdkEvent *current_event;
+  GdkEvent *current_event;
   const GtkCrossingData *current_crossing;
 
   guint is_pointer             : 1;
@@ -73,7 +73,7 @@ G_DEFINE_TYPE (GtkEventControllerMotion, gtk_event_controller_motion, GTK_TYPE_E
 
 static gboolean
 gtk_event_controller_motion_handle_event (GtkEventController *controller,
-                                          const GdkEvent     *event,
+                                          GdkEvent           *event,
                                           double              x,
                                           double              y)
 {
diff --git a/gtk/gtkeventcontrollerprivate.h b/gtk/gtkeventcontrollerprivate.h
index 5c2d341611..1ae4808f48 100644
--- a/gtk/gtkeventcontrollerprivate.h
+++ b/gtk/gtkeventcontrollerprivate.h
@@ -35,7 +35,7 @@ struct _GtkEventControllerClass
                              GtkWidget          *widget);
   void     (* unset_widget) (GtkEventController *controller);
   gboolean (* handle_event) (GtkEventController *controller,
-                             const GdkEvent     *event,
+                             GdkEvent            *event,
                              double              x,
                              double              y);
   void     (* reset)        (GtkEventController *controller);
@@ -51,7 +51,7 @@ struct _GtkEventControllerClass
    * the event unseen by the handle_event vfunc.
    */
   gboolean (* filter_event) (GtkEventController *controller,
-                             const GdkEvent     *event);
+                             GdkEvent           *event);
 
   gpointer padding[10];
 };
diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c
index f750710cd5..07d44c4b44 100644
--- a/gtk/gtkeventcontrollerscroll.c
+++ b/gtk/gtkeventcontrollerscroll.c
@@ -238,7 +238,7 @@ gtk_event_controller_scroll_get_property (GObject    *object,
 
 static gboolean
 gtk_event_controller_scroll_handle_event (GtkEventController *controller,
-                                          const GdkEvent     *event,
+                                          GdkEvent           *event,
                                           double              x,
                                           double              y)
 {
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 9a422593dd..1a269e8528 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -2708,7 +2708,7 @@ gtk_flow_box_click_gesture_released (GtkGestureClick *gesture,
         {
           GdkEventSequence *sequence;
           GdkInputSource source;
-          const GdkEvent *event;
+          GdkEvent *event;
           gboolean modify;
           gboolean extend;
 
diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c
index 9275b8ba14..c92d939246 100644
--- a/gtk/gtkgesture.c
+++ b/gtk/gtkgesture.c
@@ -440,7 +440,7 @@ gtk_gesture_get_group_state (GtkGesture       *gesture,
 
 static gboolean
 _gtk_gesture_update_point (GtkGesture     *gesture,
-                           const GdkEvent *event,
+                           GdkEvent       *event,
                            GtkWidget      *target,
                            double          x,
                            double          y,
@@ -539,7 +539,7 @@ _gtk_gesture_check_empty (GtkGesture *gesture)
 
 static void
 _gtk_gesture_remove_point (GtkGesture     *gesture,
-                           const GdkEvent *event)
+                           GdkEvent       *event)
 {
   GdkEventSequence *sequence;
   GtkGesturePrivate *priv;
@@ -588,7 +588,7 @@ gesture_within_surface (GtkGesture *gesture,
 
 static gboolean
 gtk_gesture_filter_event (GtkEventController *controller,
-                          const GdkEvent     *event)
+                          GdkEvent           *event)
 {
   /* Even though GtkGesture handles these events, we want
    * touchpad gestures disabled by default, it will be
@@ -603,7 +603,7 @@ gtk_gesture_filter_event (GtkEventController *controller,
 
 static gboolean
 gtk_gesture_handle_event (GtkEventController *controller,
-                          const GdkEvent     *event,
+                          GdkEvent           *event,
                           double              x,
                           double              y)
 {
@@ -1151,7 +1151,7 @@ gtk_gesture_get_last_updated_sequence (GtkGesture *gesture)
  *
  * Returns: (transfer none) (nullable): The last event from @sequence
  **/
-const GdkEvent *
+GdkEvent *
 gtk_gesture_get_last_event (GtkGesture       *gesture,
                             GdkEventSequence *sequence)
 {
@@ -1337,7 +1337,7 @@ gtk_gesture_get_bounding_box_center (GtkGesture *gesture,
                                      gdouble    *x,
                                      gdouble    *y)
 {
-  const GdkEvent *last_event;
+  GdkEvent *last_event;
   GdkRectangle rect;
   GdkEventSequence *sequence;
 
diff --git a/gtk/gtkgesture.h b/gtk/gtkgesture.h
index 8a11a155a8..6cccfc0e75 100644
--- a/gtk/gtkgesture.h
+++ b/gtk/gtkgesture.h
@@ -66,7 +66,7 @@ GDK_AVAILABLE_IN_ALL
 gboolean    gtk_gesture_handles_sequence     (GtkGesture       *gesture,
                                               GdkEventSequence *sequence);
 GDK_AVAILABLE_IN_ALL
-const GdkEvent *
+GdkEvent *
             gtk_gesture_get_last_event       (GtkGesture       *gesture,
                                               GdkEventSequence *sequence);
 
diff --git a/gtk/gtkgestureclick.c b/gtk/gtkgestureclick.c
index 27b64eb684..ba815e4eb8 100644
--- a/gtk/gtkgestureclick.c
+++ b/gtk/gtkgestureclick.c
@@ -197,7 +197,7 @@ gtk_gesture_click_begin (GtkGesture       *gesture,
   GtkGestureClickPrivate *priv;
   guint n_presses, button = 1;
   GdkEventSequence *current;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkEventType event_type;
   GdkDevice *device;
   gdouble x, y;
@@ -307,7 +307,7 @@ gtk_gesture_click_reset (GtkEventController *controller)
 
 static gboolean
 gtk_gesture_click_handle_event (GtkEventController *controller,
-                                const GdkEvent     *event,
+                                GdkEvent           *event,
                                 double              x,
                                 double              y)
 {
diff --git a/gtk/gtkgesturedrag.c b/gtk/gtkgesturedrag.c
index 54cdacb683..fa63ba8f45 100644
--- a/gtk/gtkgesturedrag.c
+++ b/gtk/gtkgesturedrag.c
@@ -60,7 +60,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkGestureDrag, gtk_gesture_drag, GTK_TYPE_GESTURE_S
 
 static gboolean
 gtk_gesture_drag_filter_event (GtkEventController *controller,
-                               const GdkEvent     *event)
+                               GdkEvent           *event)
 {
   /* Let touchpad swipe events go through, only if they match n-points  */
   if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)
diff --git a/gtk/gtkgesturelongpress.c b/gtk/gtkgesturelongpress.c
index 9639ea151c..6475919974 100644
--- a/gtk/gtkgesturelongpress.c
+++ b/gtk/gtkgesturelongpress.c
@@ -116,7 +116,7 @@ gtk_gesture_long_press_begin (GtkGesture       *gesture,
                               GdkEventSequence *sequence)
 {
   GtkGestureLongPressPrivate *priv;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkEventType event_type;
   GtkWidget *widget;
   gint delay;
diff --git a/gtk/gtkgesturerotate.c b/gtk/gtkgesturerotate.c
index 70171e5c8c..fa0568fb70 100644
--- a/gtk/gtkgesturerotate.c
+++ b/gtk/gtkgesturerotate.c
@@ -78,7 +78,7 @@ _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate,
                                gdouble          *angle)
 {
   GtkGestureRotatePrivate *priv;
-  const GdkEvent *last_event;
+  GdkEvent *last_event;
   gdouble x1, y1, x2, y2;
   GtkGesture *gesture;
   gdouble dx, dy;
@@ -172,7 +172,7 @@ gtk_gesture_rotate_update (GtkGesture       *gesture,
 
 static gboolean
 gtk_gesture_rotate_filter_event (GtkEventController *controller,
-                                 const GdkEvent     *event)
+                                 GdkEvent           *event)
 {
   /* Let 2-finger touchpad pinch events go through */
   if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)
@@ -192,7 +192,7 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller,
 
 static gboolean
 gtk_gesture_rotate_handle_event (GtkEventController *controller,
-                                 const GdkEvent     *event,
+                                 GdkEvent           *event,
                                  double              x,
                                  double              y)
 {
diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c
index 1e6a37568c..b99eee1823 100644
--- a/gtk/gtkgesturesingle.c
+++ b/gtk/gtkgesturesingle.c
@@ -131,7 +131,7 @@ gtk_gesture_single_cancel (GtkGesture       *gesture,
 
 static gboolean
 gtk_gesture_single_handle_event (GtkEventController *controller,
-                                 const GdkEvent     *event,
+                                 GdkEvent           *event,
                                  double              x,
                                  double              y)
 {
diff --git a/gtk/gtkgesturestylus.c b/gtk/gtkgesturestylus.c
index 6a4f645e25..610c7fb6ae 100644
--- a/gtk/gtkgesturestylus.c
+++ b/gtk/gtkgesturestylus.c
@@ -49,7 +49,7 @@ static guint signals[N_SIGNALS] = { 0, };
 
 static gboolean
 gtk_gesture_stylus_handle_event (GtkEventController *controller,
-                                 const GdkEvent     *event,
+                                 GdkEvent           *event,
                                  double              x,
                                  double              y)
 {
@@ -162,7 +162,7 @@ gtk_gesture_stylus_new (void)
                        NULL);
 }
 
-static const GdkEvent *
+static GdkEvent *
 gesture_get_current_event (GtkGestureStylus *gesture)
 {
   GdkEventSequence *sequence;
@@ -190,7 +190,7 @@ gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture,
                             GdkAxisUse        axis,
                             gdouble          *value)
 {
-  const GdkEvent *event;
+  GdkEvent *event;
 
   g_return_val_if_fail (GTK_IS_GESTURE_STYLUS (gesture), FALSE);
   g_return_val_if_fail (axis < GDK_AXIS_LAST, FALSE);
@@ -221,7 +221,7 @@ gtk_gesture_stylus_get_axes (GtkGestureStylus  *gesture,
                             GdkAxisUse         axes[],
                             gdouble          **values)
 {
-  const GdkEvent *event;
+  GdkEvent *event;
   GArray *array;
   gint i = 0;
 
@@ -281,7 +281,7 @@ gtk_gesture_stylus_get_backlog (GtkGestureStylus  *gesture,
                                GdkTimeCoord     **backlog,
                                guint             *n_elems)
 {
-  const GdkEvent *event;
+  GdkEvent *event;
   GArray *backlog_array;
   GList *history = NULL, *l;
 
@@ -339,7 +339,7 @@ gtk_gesture_stylus_get_backlog (GtkGestureStylus  *gesture,
 GdkDeviceTool *
 gtk_gesture_stylus_get_device_tool (GtkGestureStylus *gesture)
 {
-  const GdkEvent *event;
+  GdkEvent *event;
 
   g_return_val_if_fail (GTK_IS_GESTURE_STYLUS (gesture), FALSE);
 
diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c
index 2ff8678c7f..eb0a04a195 100644
--- a/gtk/gtkgestureswipe.c
+++ b/gtk/gtkgestureswipe.c
@@ -82,7 +82,7 @@ gtk_gesture_swipe_finalize (GObject *object)
 
 static gboolean
 gtk_gesture_swipe_filter_event (GtkEventController *controller,
-                                const GdkEvent     *event)
+                                GdkEvent           *event)
 {
   /* Let touchpad swipe events go through, only if they match n-points  */
   if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)
diff --git a/gtk/gtkgesturezoom.c b/gtk/gtkgesturezoom.c
index 208daf74b2..402d313912 100644
--- a/gtk/gtkgesturezoom.c
+++ b/gtk/gtkgesturezoom.c
@@ -76,7 +76,7 @@ static gboolean
 _gtk_gesture_zoom_get_distance (GtkGestureZoom *zoom,
                                 gdouble        *distance)
 {
-  const GdkEvent *last_event;
+  GdkEvent *last_event;
   gdouble x1, y1, x2, y2;
   GtkGesture *gesture;
   GList *sequences = NULL;
@@ -149,7 +149,7 @@ _gtk_gesture_zoom_check_emit (GtkGestureZoom *gesture)
 
 static gboolean
 gtk_gesture_zoom_filter_event (GtkEventController *controller,
-                               const GdkEvent     *event)
+                               GdkEvent           *event)
 {
   /* Let 2-finger touchpad pinch events go through */
   if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index caae6ac360..3f0de76ca6 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -2128,7 +2128,7 @@ gtk_icon_view_button_press (GtkGestureClick *gesture,
   GtkCellRenderer *cell = NULL, *cursor_cell = NULL;
   int button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
   GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
-  const GdkEventButton *event = (const GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), 
sequence);
+  GdkEventButton *event = (GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
   GdkModifierType state;
 
   if (!gtk_widget_has_focus (widget))
@@ -2276,7 +2276,7 @@ gtk_icon_view_button_press (GtkGestureClick *gesture,
 }
 
 static gboolean
-button_event_modifies_selection (const GdkEventButton *event)
+button_event_modifies_selection (GdkEventButton *event)
 {
   guint state;
 
@@ -2294,7 +2294,7 @@ gtk_icon_view_button_release (GtkGestureClick *gesture,
   GtkIconView *icon_view = user_data;
   int button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
   GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
-  const GdkEventButton *event = (const GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), 
sequence);
+  GdkEventButton *event = (GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
 
   if (icon_view->priv->pressed_button == button)
     icon_view->priv->pressed_button = -1;
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index abbf6431ba..60d3898c18 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -4456,7 +4456,7 @@ gtk_label_click_gesture_pressed (GtkGestureClick *gesture,
   GtkLabelSelectionInfo *info = priv->select_info;
   GtkWidget *widget = GTK_WIDGET (label);
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   guint button;
 
   button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
@@ -4633,7 +4633,7 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture,
   GtkLabelSelectionInfo *info = priv->select_info;
   GdkModifierType state_mask;
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   gint min, max, index;
 
   if (!info || !info->selectable)
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 129ff90a87..b3dbda9bb1 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -451,7 +451,7 @@ gtk_link_button_pressed_cb (GtkGestureClick *gesture,
   GtkLinkButton *link_button = user_data;
   GtkLinkButtonPrivate *priv = gtk_link_button_get_instance_private (link_button);
   GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
-  const GdkEvent *event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
+  GdkEvent *event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
 
   if (!gtk_widget_has_focus (GTK_WIDGET (link_button)))
     gtk_widget_grab_focus (GTK_WIDGET (link_button));
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index c36c73d2ef..9db8ee9ac0 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1867,7 +1867,7 @@ gtk_list_box_click_gesture_released (GtkGestureClick *gesture,
         {
           GdkEventSequence *sequence;
           GdkInputSource source;
-          const GdkEvent *event;
+          GdkEvent *event;
           gboolean modify;
           gboolean extend;
 
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index c903b85c98..a51b428610 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2198,7 +2198,7 @@ gtk_get_current_event_device (void)
  *     received @event, or %NULL
  */
 GtkWidget*
-gtk_get_event_widget (const GdkEvent *event)
+gtk_get_event_widget (GdkEvent *event)
 {
   GtkWidget *widget;
 
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index a71b6488ce..f253dae595 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -132,7 +132,7 @@ GDK_AVAILABLE_IN_ALL
 GdkDevice *gtk_get_current_event_device (void);
 
 GDK_AVAILABLE_IN_ALL
-GtkWidget *gtk_get_event_widget         (const GdkEvent  *event);
+GtkWidget *gtk_get_event_widget         (GdkEvent  *event);
 
 G_END_DECLS
 
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index 6efba15c59..3be232061c 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -1406,7 +1406,7 @@ on_end_process_activated (GtkModelButton *button,
 
 static gboolean
 do_popup_menu_for_process_tree_view (GtkWidget         *widget,
-                                     const GdkEvent    *event,
+                                     GdkEvent          *event,
                                      GtkMountOperation *op)
 {
   GtkWidget *menu;
@@ -1471,7 +1471,7 @@ click_cb (GtkGesture *gesture,
                 gpointer    user_data)
 {
   GtkMountOperation *op = GTK_MOUNT_OPERATION (user_data);
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkEventSequence *sequence;
   GtkWidget *widget;
 
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 6f7894defe..214958421f 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2464,7 +2464,7 @@ gtk_notebook_gesture_pressed (GtkGestureClick *gesture,
   GdkEventSequence *sequence;
   GtkNotebookArrow arrow;
   GtkNotebookPage *page;
-  const GdkEvent *event;
+  GdkEvent *event;
   guint button;
   GList *tab;
 
@@ -2723,7 +2723,7 @@ gtk_notebook_gesture_released (GtkGestureClick *gesture,
   GtkNotebook *notebook = user_data;
   GtkNotebookPrivate *priv = notebook->priv;
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   guint button;
 
   sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
diff --git a/gtk/gtkpadcontroller.c b/gtk/gtkpadcontroller.c
index 696babc616..455d538982 100644
--- a/gtk/gtkpadcontroller.c
+++ b/gtk/gtkpadcontroller.c
@@ -208,7 +208,7 @@ gtk_pad_controller_handle_mode_switch (GtkPadController *controller,
 
 static gboolean
 gtk_pad_controller_filter_event (GtkEventController *controller,
-                                 const GdkEvent     *event)
+                                 GdkEvent           *event)
 {
   GtkPadController *pad_controller = GTK_PAD_CONTROLLER (controller);
   GdkEventType event_type = gdk_event_get_event_type (event);
@@ -229,7 +229,7 @@ gtk_pad_controller_filter_event (GtkEventController *controller,
 
 static gboolean
 gtk_pad_controller_handle_event (GtkEventController *controller,
-                                 const GdkEvent     *event,
+                                 GdkEvent           *event,
                                  double              x,
                                  double              y)
 {
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 6e1cda89bf..b396957906 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -745,7 +745,7 @@ gesture_drag_begin_cb (GtkGestureDrag *gesture,
   GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
   GdkEventSequence *sequence;
   graphene_rect_t handle_area;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkDevice *device;
   gboolean is_touch;
 
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 9feab541fc..4f0b3dd5f8 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1854,7 +1854,7 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture,
   GtkRangePrivate *priv = gtk_range_get_instance_private (range);
   GdkDevice *source_device;
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkInputSource source;
   gboolean primary_warps;
   gboolean shift_pressed;
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 9402eed707..f9190e4a15 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -991,7 +991,7 @@ scrolled_window_long_press_cancelled_cb (GtkScrolledWindow *scrolled_window,
 {
   GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkEventType event_type;
 
   sequence = gtk_gesture_get_last_updated_sequence (gesture);
diff --git a/gtk/gtktext.c b/gtk/gtktext.c
index b96c7a52de..85c0f6bc37 100644
--- a/gtk/gtktext.c
+++ b/gtk/gtktext.c
@@ -2554,7 +2554,7 @@ gtk_text_click_gesture_pressed (GtkGestureClick *gesture,
   GtkWidget *widget = GTK_WIDGET (self);
   GtkTextPrivate *priv = gtk_text_get_instance_private (self);
   GdkEventSequence *current;
-  const GdkEvent *event;
+  GdkEvent *event;
   int x, y, sel_start, sel_end;
   guint button;
   int tmp_pos;
@@ -2817,7 +2817,7 @@ gtk_text_drag_gesture_update (GtkGestureDrag *gesture,
   GtkWidget *widget = GTK_WIDGET (self);
   GtkTextPrivate *priv = gtk_text_get_instance_private (self);
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   int x, y;
 
   gtk_text_selection_bubble_popup_unset (self);
@@ -2971,7 +2971,7 @@ gtk_text_drag_gesture_end (GtkGestureDrag *gesture,
   GtkTextPrivate *priv = gtk_text_get_instance_private (self);
   gboolean in_drag, is_touchscreen;
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkDevice *source;
 
   sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index d9734e7a3a..4d1ef31c72 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -480,7 +480,7 @@ static void     gtk_text_view_start_selection_drag   (GtkTextView          *text
 static gboolean gtk_text_view_end_selection_drag     (GtkTextView        *text_view);
 static void     gtk_text_view_start_selection_dnd    (GtkTextView        *text_view,
                                                       const GtkTextIter  *iter,
-                                                      const GdkEvent     *event,
+                                                      GdkEvent           *event,
                                                       gint                x,
                                                       gint                y);
 static void     gtk_text_view_check_cursor_blink     (GtkTextView        *text_view);
@@ -528,7 +528,7 @@ static void gtk_text_view_set_virtual_cursor_pos (GtkTextView       *text_view,
                                                   gint               y);
 
 static void gtk_text_view_do_popup               (GtkTextView       *text_view,
-                                                 const GdkEvent    *event);
+                                                 GdkEvent          *event);
 
 static void cancel_pending_scroll                (GtkTextView   *text_view);
 static void gtk_text_view_queue_scroll           (GtkTextView   *text_view,
@@ -5161,7 +5161,7 @@ gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture,
 {
   GdkEventSequence *sequence;
   GtkTextViewPrivate *priv;
-  const GdkEvent *event;
+  GdkEvent *event;
   gboolean is_touchscreen;
   GdkDevice *device;
   GtkTextIter iter;
@@ -7140,7 +7140,7 @@ gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture,
   gint start_x, start_y, x, y;
   GdkEventSequence *sequence;
   gboolean is_touchscreen;
-  const GdkEvent *event;
+  GdkEvent *event;
   SelectionData *data;
   GdkDevice *device;
   GtkTextIter cursor;
@@ -7259,7 +7259,7 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
   gint start_x, start_y, x, y;
   GdkEventSequence *sequence;
   GtkTextViewPrivate *priv;
-  const GdkEvent *event;
+  GdkEvent *event;
   GdkDevice *device;
 
   priv = text_view->priv;
@@ -7701,7 +7701,7 @@ dnd_finished_cb (GdkDrag     *drag,
 static void
 gtk_text_view_start_selection_dnd (GtkTextView       *text_view,
                                    const GtkTextIter *iter,
-                                   const GdkEvent    *event,
+                                   GdkEvent          *event,
                                    gint               x,
                                    gint               y)
 {
@@ -8627,7 +8627,7 @@ gtk_text_view_get_menu_model (GtkTextView *text_view)
 
 static void
 gtk_text_view_do_popup (GtkTextView    *text_view,
-                        const GdkEvent *event)
+                        GdkEvent       *event)
 {
   GtkTextViewPrivate *priv = text_view->priv;
   GdkEvent *trigger_event;
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 28b9a540c8..ed40f73377 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2806,7 +2806,7 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
   GtkTreeViewColumn *column = NULL;
   GdkEventSequence *sequence;
   GdkModifierType modifiers;
-  const GdkEvent *event;
+  GdkEvent *event;
   gint new_y, y_offset;
   gint bin_x, bin_y;
   GtkTreePath *path;
@@ -13669,7 +13669,7 @@ gtk_tree_view_search_pressed_cb (GtkGesture  *gesture,
 {
   GdkDevice *keyb_device;
   GdkEventSequence *sequence;
-  const GdkEvent *event;
+  GdkEvent *event;
 
   sequence = gtk_gesture_get_last_updated_sequence (gesture);
   event = gtk_gesture_get_last_event (gesture, sequence);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 22aa7a9b9b..bc9ce587dc 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -688,7 +688,7 @@ static void gtk_widget_set_usize_internal (GtkWidget          *widget,
                                           gint                width,
                                           gint                height);
 
-static gboolean event_surface_is_still_viewable (const GdkEvent *event);
+static gboolean event_surface_is_still_viewable (GdkEvent *event);
 
 static void gtk_widget_update_input_shape (GtkWidget *widget);
 
@@ -2044,7 +2044,7 @@ gtk_widget_get_property (GObject         *object,
 
 static void
 _gtk_widget_emulate_press (GtkWidget      *widget,
-                           const GdkEvent *event,
+                           GdkEvent       *event,
                            GtkWidget      *event_widget)
 {
   GtkWidget *next_child, *parent;
@@ -2134,14 +2134,14 @@ _gtk_widget_emulate_press (GtkWidget      *widget,
   g_object_unref (press);
 }
 
-static const GdkEvent *
+static GdkEvent *
 _gtk_widget_get_last_event (GtkWidget         *widget,
                             GdkEventSequence  *sequence,
                             GtkWidget        **target)
 {
   GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
   GtkEventController *controller;
-  const GdkEvent *event;
+  GdkEvent *event;
   GList *l;
 
   for (l = priv->event_controllers; l; l = l->next)
@@ -2175,7 +2175,7 @@ _gtk_widget_get_emulating_sequence (GtkWidget         *widget,
 
   if (sequence)
     {
-      const GdkEvent *last_event;
+      GdkEvent *last_event;
       GtkWidget *target;
 
       last_event = _gtk_widget_get_last_event (widget, sequence, &target);
@@ -2247,7 +2247,7 @@ _gtk_widget_set_sequence_state_internal (GtkWidget             *widget,
 {
   GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
   gboolean emulates_pointer, sequence_handled = FALSE;
-  const GdkEvent *mimic_event;
+  GdkEvent *mimic_event;
   GtkWidget *target;
   GList *group = NULL, *l;
   GdkEventSequence *seq;
@@ -4781,7 +4781,7 @@ gtk_widget_event (GtkWidget *widget,
 
 gboolean
 gtk_widget_run_controllers (GtkWidget           *widget,
-                            const GdkEvent      *event,
+                            GdkEvent            *event,
                             GtkWidget           *target,
                             double               x,
                             double               y,
@@ -4891,7 +4891,7 @@ _gtk_widget_captured_event (GtkWidget *widget,
 }
 
 static gboolean
-event_surface_is_still_viewable (const GdkEvent *event)
+event_surface_is_still_viewable (GdkEvent *event)
 {
   /* Check that we think the event's window is viewable before
    * delivering the event, to prevent surprises. We do this here
@@ -11896,7 +11896,7 @@ gtk_widget_cancel_event_sequence (GtkWidget             *widget,
   gboolean handled = FALSE;
   GtkWidget *event_widget;
   gboolean cancel = TRUE;
-  const GdkEvent *event;
+  GdkEvent *event;
 
   handled = _gtk_widget_set_sequence_state_internal (widget, sequence,
                                                      state, gesture);
diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h
index c035204154..7ba6c12bcd 100644
--- a/gtk/gtkwidgetprivate.h
+++ b/gtk/gtkwidgetprivate.h
@@ -344,7 +344,7 @@ void              gtk_widget_cancel_event_sequence         (GtkWidget
                                                             GtkEventSequenceState  state);
 
 gboolean          gtk_widget_run_controllers               (GtkWidget           *widget,
-                                                            const GdkEvent      *event,
+                                                            GdkEvent            *event,
                                                             GtkWidget           *target,
                                                             double               x,
                                                             double               y,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ea8cbaae7f..d2f141b5fd 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1273,7 +1273,7 @@ popover_destroy (GtkWindowPopover *popover)
 
 static gboolean
 gtk_window_titlebar_action (GtkWindow      *window,
-                            const GdkEvent *event,
+                            GdkEvent       *event,
                             guint           button,
                             gint            n_press)
 {
@@ -1343,7 +1343,7 @@ click_gesture_pressed_cb (GtkGestureClick *gesture,
   GtkWidget *event_widget, *widget;
   GdkEventSequence *sequence;
   GtkWindowRegion region;
-  const GdkEvent *event;
+  GdkEvent *event;
   guint button;
   gboolean window_drag = FALSE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]