[gimp/gtk3-port: 449/454] app: extended device concept does not seem to exist in GTK+3.
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 449/454] app: extended device concept does not seem to exist in GTK+3.
- Date: Wed, 16 May 2018 21:58:28 +0000 (UTC)
commit 9563fcb28a60c9cb31db15e47a3a784ba7259030
Author: Jehan <jehan girinstud io>
Date: Mon May 14 22:38:07 2018 +0200
app: extended device concept does not seem to exist in GTK+3.
We were keeping around a flag telling us if coordinates are extended or
not. In GTK+2, a device indeed had to be enabled. In GTK+3, I can see
that device with extended inputs are enabled by default (they always
have pressure, etc.). This flag is made useless.
app/core/core-types.h | 1 -
app/core/gimpcoords.c | 2 -
app/paint/gimpmybrushcore.c | 4 ---
app/widgets/gimpdeviceinfo-coords.c | 36 -----------------------------------
4 files changed, 0 insertions(+), 43 deletions(-)
---
diff --git a/app/core/core-types.h b/app/core/core-types.h
index 310d39d..d687c9e 100644
--- a/app/core/core-types.h
+++ b/app/core/core-types.h
@@ -255,7 +255,6 @@ struct _GimpCoords
gdouble yscale;
gdouble angle; /* the view rotation angle */
gboolean reflect; /* whether the view is reflected */
- gboolean extended;
};
/* temp hack as replacement for GdkSegment */
diff --git a/app/core/gimpcoords.c b/app/core/gimpcoords.c
index d65ad54..038af89 100644
--- a/app/core/gimpcoords.c
+++ b/app/core/gimpcoords.c
@@ -51,7 +51,6 @@ gimp_coords_mix (const gdouble amul,
ret_val->wheel = amul * a->wheel + bmul * b->wheel;
ret_val->velocity = amul * a->velocity + bmul * b->velocity;
ret_val->direction = amul * a->direction + bmul * b->direction;
- ret_val->extended = b->extended || a->extended;
}
else
{
@@ -63,7 +62,6 @@ gimp_coords_mix (const gdouble amul,
ret_val->wheel = amul * a->wheel;
ret_val->velocity = amul * a->velocity;
ret_val->direction = amul * a->direction;
- ret_val->extended = a->extended;
}
}
diff --git a/app/paint/gimpmybrushcore.c b/app/paint/gimpmybrushcore.c
index 52ef69e..4c1c9e8 100644
--- a/app/paint/gimpmybrushcore.c
+++ b/app/paint/gimpmybrushcore.c
@@ -313,10 +313,6 @@ gimp_mybrush_core_motion (GimpPaintCore *paint_core,
GimpCoords *coords = gimp_symmetry_get_coords (sym, i);
gdouble pressure = coords->pressure;
- /* libmypaint expects non-extended devices to default to 0.5 pressure */
- if (! coords->extended)
- pressure = 0.5f;
-
mypaint_brush_stroke_to (brush,
(MyPaintSurface *) mybrush->private->surface,
coords->x,
diff --git a/app/widgets/gimpdeviceinfo-coords.c b/app/widgets/gimpdeviceinfo-coords.c
index 3827522..7aa566a 100644
--- a/app/widgets/gimpdeviceinfo-coords.c
+++ b/app/widgets/gimpdeviceinfo-coords.c
@@ -101,18 +101,6 @@ gimp_device_info_get_event_coords (GimpDeviceInfo *info,
coords->wheel);
}
- if (gimp_device_info_get_mode (info) != GDK_MODE_DISABLED &&
- gdk_device_get_source (info->device) != GDK_SOURCE_MOUSE)
- {
- /* The event was generated by an enabled extended non-mouse device */
- coords->extended = TRUE;
- }
- else
- {
- /* The event was generated by a not extended enabled device */
- coords->extended = FALSE;
- }
-
return TRUE;
}
@@ -184,18 +172,6 @@ gimp_device_info_get_device_coords (GimpDeviceInfo *info,
GDK_AXIS_WHEEL,
coords->wheel);
}
-
- if (gimp_device_info_get_mode (info) != GDK_MODE_DISABLED &&
- gdk_device_get_source (info->device) != GDK_SOURCE_MOUSE)
- {
- /* The event was generated by an enabled extended non-mouse device */
- coords->extended = TRUE;
- }
- else
- {
- /* The event was generated by a not extended enabled device */
- coords->extended = FALSE;
- }
}
void
@@ -243,18 +219,6 @@ gimp_device_info_get_time_coords (GimpDeviceInfo *info,
GDK_AXIS_WHEEL,
coords->wheel);
}
-
- if (gimp_device_info_get_mode (info) != GDK_MODE_DISABLED &&
- gdk_device_get_source (info->device) != GDK_SOURCE_MOUSE)
- {
- /* The event was generated by an enabled extended non-mouse device */
- coords->extended = TRUE;
- }
- else
- {
- /* The event was generated by a not extended enabled device */
- coords->extended = FALSE;
- }
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]