[mutter/wip/carlosg/input-in-backends: 138/143] clutter: Drop unused function to translate to screen coordinates
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/input-in-backends: 138/143] clutter: Drop unused function to translate to screen coordinates
- Date: Fri, 16 Aug 2019 17:50:28 +0000 (UTC)
commit f8c5fcfb9c23f4c5c237932072a2050682b3455f
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.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/672
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 d8be15aab..6905eb8e8 100644
--- a/clutter/clutter/x11/clutter-backend-x11.c
+++ b/clutter/clutter/x11/clutter-backend-x11.c
@@ -1110,51 +1110,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 4a6bd8d4b..893cc18fe 100644
--- a/clutter/clutter/x11/clutter-backend-x11.h
+++ b/clutter/clutter/x11/clutter-backend-x11.h
@@ -108,13 +108,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]