[gtk/readonly-events-1: 8/27] events: Drop x_root/y_root



commit 47312a9b6d71ad629e08d2df4dbe7eae539f4a8e
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 14 18:23:45 2020 -0500

    events: Drop x_root/y_root
    
    We are not using these fields anymore.

 gdk/gdkevents.c        | 26 --------------------------
 gdk/gdkeventsprivate.h | 36 ------------------------------------
 2 files changed, 62 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index f565ed327b..02994793e1 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -478,15 +478,11 @@ gdk_event_constructed (GObject *object)
     case GDK_MOTION_NOTIFY:
       new_event->motion.x = 0.;
       new_event->motion.y = 0.;
-      new_event->motion.x_root = 0.;
-      new_event->motion.y_root = 0.;
       break;
     case GDK_BUTTON_PRESS:
     case GDK_BUTTON_RELEASE:
       new_event->button.x = 0.;
       new_event->button.y = 0.;
-      new_event->button.x_root = 0.;
-      new_event->button.y_root = 0.;
       break;
     case GDK_TOUCH_BEGIN:
     case GDK_TOUCH_UPDATE:
@@ -494,14 +490,10 @@ gdk_event_constructed (GObject *object)
     case GDK_TOUCH_CANCEL:
       new_event->touch.x = 0.;
       new_event->touch.y = 0.;
-      new_event->touch.x_root = 0.;
-      new_event->touch.y_root = 0.;
       break;
     case GDK_SCROLL:
       new_event->scroll.x = 0.;
       new_event->scroll.y = 0.;
-      new_event->scroll.x_root = 0.;
-      new_event->scroll.y_root = 0.;
       new_event->scroll.delta_x = 0.;
       new_event->scroll.delta_y = 0.;
       new_event->scroll.is_stop = FALSE;
@@ -510,16 +502,12 @@ gdk_event_constructed (GObject *object)
     case GDK_LEAVE_NOTIFY:
       new_event->crossing.x = 0.;
       new_event->crossing.y = 0.;
-      new_event->crossing.x_root = 0.;
-      new_event->crossing.y_root = 0.;
       break;
     case GDK_TOUCHPAD_SWIPE:
       new_event->touchpad_swipe.x = 0;
       new_event->touchpad_swipe.y = 0;
       new_event->touchpad_swipe.dx = 0;
       new_event->touchpad_swipe.dy = 0;
-      new_event->touchpad_swipe.x_root = 0;
-      new_event->touchpad_swipe.y_root = 0;
       break;
     case GDK_TOUCHPAD_PINCH:
       new_event->touchpad_pinch.x = 0;
@@ -528,8 +516,6 @@ gdk_event_constructed (GObject *object)
       new_event->touchpad_pinch.dy = 0;
       new_event->touchpad_pinch.angle_delta = 0;
       new_event->touchpad_pinch.scale = 0;
-      new_event->touchpad_pinch.x_root = 0;
-      new_event->touchpad_pinch.y_root = 0;
       break;
     default:
       break;
@@ -2454,8 +2440,6 @@ gdk_event_button_new (GdkEventType     type,
   event->button.button = button;
   event->button.x = x;
   event->button.y = y;
-  event->button.x_root = NAN;
-  event->button.y_root = NAN;
 
   return event;
 }
@@ -2479,8 +2463,6 @@ gdk_event_motion_new (GdkSurface      *surface,
   event->motion.time = time;
   event->motion.x = x;
   event->motion.y = y;
-  event->motion.x_root = NAN;
-  event->motion.y_root = NAN;
   event->motion.state = state;
 
   return event;
@@ -2512,8 +2494,6 @@ gdk_event_crossing_new (GdkEventType     type,
   event->crossing.state = state;
   event->crossing.x = x;
   event->crossing.y = y;
-  event->crossing.x_root = NAN;
-  event->crossing.y_root = NAN;
   event->crossing.mode = mode;
   event->crossing.detail = detail;
 
@@ -2640,8 +2620,6 @@ gdk_event_scroll_new (GdkSurface      *surface,
   event->scroll.state = state;
   event->scroll.x = NAN;
   event->scroll.y = NAN;
-  event->scroll.x_root = NAN;
-  event->scroll.y_root = NAN;
   event->scroll.direction = GDK_SCROLL_SMOOTH;
   event->scroll.delta_x = delta_x;
   event->scroll.delta_y = delta_y;
@@ -2669,8 +2647,6 @@ gdk_event_discrete_scroll_new (GdkSurface         *surface,
   event->scroll.state = state;
   event->scroll.x = NAN;
   event->scroll.y = NAN;
-  event->scroll.x_root = NAN;
-  event->scroll.y_root = NAN;
   event->scroll.direction = direction;
   gdk_event_set_pointer_emulated (event, emulated);
 
@@ -2706,8 +2682,6 @@ gdk_event_touch_new (GdkEventType      type,
   event->touch.state = state;
   event->touch.x = x;
   event->touch.y = y;
-  event->touch.x_root = NAN;
-  event->touch.y_root = NAN;
   event->touch.emulating_pointer = emulating;
   gdk_event_set_pointer_emulated (event, emulating);
 
diff --git a/gdk/gdkeventsprivate.h b/gdk/gdkeventsprivate.h
index 4c79093a52..bc6fa37622 100644
--- a/gdk/gdkeventsprivate.h
+++ b/gdk/gdkeventsprivate.h
@@ -79,9 +79,6 @@ struct _GdkEventAny
  *   buttons. See #GdkModifierType.
  * @device: the master device that the event originated from. Use
  * gdk_event_get_source_device() to get the slave device.
- * @x_root: the x coordinate of the pointer relative to the root of the
- *   screen.
- * @y_root: the y coordinate of the pointer relative to the root of the
  *   screen.
  *
  * Generated when the pointer moves.
@@ -95,7 +92,6 @@ struct _GdkEventMotion
   gdouble *axes;
   guint state;
   GdkDeviceTool *tool;
-  gdouble x_root, y_root;
   GList *history;
 };
 
@@ -118,9 +114,6 @@ struct _GdkEventMotion
  *   often be simulated by pressing both mouse buttons together.
  * @device: the master device that the event originated from. Use
  * gdk_event_get_source_device() to get the slave device.
- * @x_root: the x coordinate of the pointer relative to the root of the
- *   screen.
- * @y_root: the y coordinate of the pointer relative to the root of the
  *   screen.
  *
  * Used for button press and button release events. The
@@ -136,7 +129,6 @@ struct _GdkEventButton
   guint state;
   guint button;
   GdkDeviceTool *tool;
-  gdouble x_root, y_root;
 };
 
 /*
@@ -158,9 +150,6 @@ struct _GdkEventButton
  *   pointer event
  * @device: the master device that the event originated from. Use
  * gdk_event_get_source_device() to get the slave device.
- * @x_root: the x coordinate of the pointer relative to the root of the
- *   screen
- * @y_root: the y coordinate of the pointer relative to the root of the
  *   screen
  *
  * Used for touch events.
@@ -184,7 +173,6 @@ struct _GdkEventTouch
   guint state;
   GdkEventSequence *sequence;
   gboolean emulating_pointer;
-  gdouble x_root, y_root;
 };
 
 /*
@@ -203,10 +191,6 @@ struct _GdkEventTouch
  *   %GDK_SCROLL_SMOOTH).
  * @device: the master device that the event originated from. Use
  * gdk_event_get_source_device() to get the slave device.
- * @x_root: the x coordinate of the pointer relative to the root of the
- *   screen.
- * @y_root: the y coordinate of the pointer relative to the root of the
- *   screen.
  * @delta_x: the x coordinate of the scroll delta
  * @delta_y: the y coordinate of the scroll delta
  *
@@ -227,7 +211,6 @@ struct _GdkEventScroll
   gdouble y;
   guint state;
   GdkScrollDirection direction;
-  gdouble x_root, y_root;
   gdouble delta_x;
   gdouble delta_y;
   guint is_stop : 1;
@@ -274,8 +257,6 @@ struct _GdkEventKey
  * @time: the time of the event in milliseconds.
  * @x: the x coordinate of the pointer relative to the surface.
  * @y: the y coordinate of the pointer relative to the surface.
- * @x_root: the x coordinate of the pointer relative to the root of the screen.
- * @y_root: the y coordinate of the pointer relative to the root of the screen.
  * @mode: the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
  *  %GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
  *  %GDK_CROSSING_STATE_CHANGED).  %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
@@ -298,8 +279,6 @@ struct _GdkEventCrossing
   guint32 time;
   gdouble x;
   gdouble y;
-  gdouble x_root;
-  gdouble y_root;
   GdkCrossingMode mode;
   GdkNotifyType detail;
   gboolean focus;
@@ -408,10 +387,6 @@ struct _GdkEventGrabBroken {
  * @send_event: %TRUE if the event was sent explicitly.
  * @drop: the #GdkDrop for the current DND operation.
  * @time: the time of the event in milliseconds.
- * @x_root: the x coordinate of the pointer relative to the root of the
- *   screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
- * @y_root: the y coordinate of the pointer relative to the root of the
- *   screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
  *
  * Generated during DND operations.
  */
@@ -420,7 +395,6 @@ struct _GdkEventDND {
   GdkDrop *drop;
 
   guint32 time;
-  double x_root, y_root;
   double x;
   double y;
 };
@@ -437,10 +411,6 @@ struct _GdkEventDND {
  * @y: The Y coordinate of the pointer
  * @dx: Movement delta in the X axis of the swipe focal point
  * @dy: Movement delta in the Y axis of the swipe focal point
- * @x_root: The X coordinate of the pointer, relative to the
- *   root of the screen.
- * @y_root: The Y coordinate of the pointer, relative to the
- *   root of the screen.
  * @state: (type GdkModifierType): a bit-mask representing the state of
  *   the modifier keys (e.g. Control, Shift and Alt) and the pointer
  *   buttons. See #GdkModifierType.
@@ -456,7 +426,6 @@ struct _GdkEventTouchpadSwipe {
   gdouble y;
   gdouble dx;
   gdouble dy;
-  gdouble x_root, y_root;
   guint state;
 };
 
@@ -476,10 +445,6 @@ struct _GdkEventTouchpadSwipe {
  *   denote counter-clockwise movements
  * @scale: The current scale, relative to that at the time of
  *   the corresponding %GDK_TOUCHPAD_GESTURE_PHASE_BEGIN event
- * @x_root: The X coordinate of the pointer, relative to the
- *   root of the screen.
- * @y_root: The Y coordinate of the pointer, relative to the
- *   root of the screen.
  * @state: (type GdkModifierType): a bit-mask representing the state of
  *   the modifier keys (e.g. Control, Shift and Alt) and the pointer
  *   buttons. See #GdkModifierType.
@@ -497,7 +462,6 @@ struct _GdkEventTouchpadPinch {
   gdouble dy;
   gdouble angle_delta;
   gdouble scale;
-  gdouble x_root, y_root;
   guint state;
 };
 


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