[mutter/wip/carlosg/input-in-backends: 14/16] clutter: Drop unused function to translate to screen coordinates



commit 8e6db1d6bce54f0ed2c6d7f9aa0bec2416ea287b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Mar 29 21:22:14 2019 +0100

    clutter: Drop unused function to translate to screen coordinates
    
    We don't have anything like GdkInputMode that we'd like to honor, this
    can just be dropped.

 clutter/clutter/x11/clutter-backend-x11.c | 48 -------------------------------
 clutter/clutter/x11/clutter-backend-x11.h |  7 -----
 2 files changed, 55 deletions(-)
---
diff --git a/clutter/clutter/x11/clutter-backend-x11.c b/clutter/clutter/x11/clutter-backend-x11.c
index 359e1c17c..5054f3861 100644
--- a/clutter/clutter/x11/clutter-backend-x11.c
+++ b/clutter/clutter/x11/clutter-backend-x11.c
@@ -1113,51 +1113,3 @@ clutter_x11_get_visual_info (void)
 
   return _clutter_backend_x11_get_visual_info (backend_x11);
 }
-
-gboolean
-_clutter_x11_input_device_translate_screen_coord (ClutterInputDevice *device,
-                                                  gint                stage_root_x,
-                                                  gint                stage_root_y,
-                                                  guint               index_,
-                                                  gdouble             value,
-                                                  gdouble            *axis_value)
-{
-  ClutterAxisInfo *info;
-  ClutterBackendX11 *backend_x11;
-  gdouble width, scale, offset;
-  
-  backend_x11 = CLUTTER_BACKEND_X11 (device->backend);
-
-  if (device->axes == NULL || index_ >= device->axes->len)
-    return FALSE;
-
-  info = &g_array_index (device->axes, ClutterAxisInfo, index_);
-  if (!(info->axis == CLUTTER_INPUT_AXIS_X || info->axis == CLUTTER_INPUT_AXIS_Y))
-    return FALSE;
-
-  width = info->max_value - info->min_value;
-
-  if (info->axis == CLUTTER_INPUT_AXIS_X)
-    {
-      if (width > 0)
-        scale = backend_x11->xscreen_width / width;
-      else
-        scale = 1;
-
-      offset = - stage_root_x;
-    }
-  else
-    {
-      if (width > 0)
-        scale = backend_x11->xscreen_height / width;
-      else
-        scale = 1;
-
-      offset = - stage_root_y;
-    }
-
-  if (axis_value)
-    *axis_value = offset + scale * (value - info->min_value);
-
-  return TRUE;
-}
diff --git a/clutter/clutter/x11/clutter-backend-x11.h b/clutter/clutter/x11/clutter-backend-x11.h
index c5c69dced..0b2272e8e 100644
--- a/clutter/clutter/x11/clutter-backend-x11.h
+++ b/clutter/clutter/x11/clutter-backend-x11.h
@@ -111,13 +111,6 @@ XVisualInfo *   _clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend
 
 void            _clutter_x11_select_events (Window xwin);
 
-gboolean        _clutter_x11_input_device_translate_screen_coord (ClutterInputDevice *device,
-                                                                  gint                stage_root_x,
-                                                                  gint                stage_root_y,
-                                                                  guint               index_,
-                                                                  gdouble             value,
-                                                                  gdouble            *axis_value);
-
 G_END_DECLS
 
 #endif /* __CLUTTER_BACKEND_X11_H__ */


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