Commit dbf844c0 authored by Alexia Death's avatar Alexia Death
Browse files

app: Disable history buffer via use of gimprc option

Adds non-UI option to disable the use of often buggy history buffer.
This option defaults to false, since a lot of device/X/GDK combos are broken
and the resulting stroke often actually looks better without history events.
Put (use-event-history yes) in gimprc if you want more events and possibly bugs.
parent b503cfc5
......@@ -40,6 +40,7 @@
#define DEFAULT_ACTIVATE_ON_FOCUS TRUE
#define DEFAULT_MONITOR_RESOLUTION 96.0
#define DEFAULT_MARCHING_ANTS_SPEED 200
#define DEFAULT_USE_EVENT_HISTORY FALSE
enum
{
......@@ -73,7 +74,8 @@ enum
PROP_ACTIVATE_ON_FOCUS,
PROP_SPACE_BAR_ACTION,
PROP_XOR_COLOR,
PROP_ZOOM_QUALITY
PROP_ZOOM_QUALITY,
PROP_USE_EVENT_HISTORY
};
......@@ -262,6 +264,12 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
GIMP_TYPE_ZOOM_QUALITY,
GIMP_ZOOM_QUALITY_HIGH,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_EVENT_HISTORY,
"use-event-history",
DEFAULT_USE_EVENT_HISTORY_BLURB,
DEFAULT_USE_EVENT_HISTORY,
GIMP_PARAM_STATIC_STRINGS);
}
static void
......@@ -407,6 +415,10 @@ gimp_display_config_set_property (GObject *object,
display_config->zoom_quality = g_value_get_enum (value);
break;
case PROP_USE_EVENT_HISTORY:
display_config->use_event_history = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -514,6 +526,10 @@ gimp_display_config_get_property (GObject *object,
g_value_set_enum (value, display_config->zoom_quality);
break;
case PROP_USE_EVENT_HISTORY:
g_value_set_boolean (value, display_config->use_event_history);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......
......@@ -73,6 +73,7 @@ struct _GimpDisplayConfig
GimpSpaceBarAction space_bar_action;
GimpRGB xor_color;
GimpZoomQuality zoom_quality;
gboolean use_event_history;
};
struct _GimpDisplayConfigClass
......
......@@ -461,5 +461,8 @@ N_("When enabled, pressing F1 will open the help browser.")
#define ZOOM_QUALITY_BLURB \
"There's a tradeoff between speed and quality of the zoomed-out display."
#define DEFAULT_USE_EVENT_HISTORY_BLURB \
"Bugs in event history buffer are frequent so in case of curor " \
"offset problems turning it off helps."
#endif /* __GIMP_RC_BLURBS_H__ */
......@@ -1336,6 +1336,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
*/
if ((gimp_tool_control_get_motion_mode (active_tool->control) ==
GIMP_MOTION_MODE_EXACT) &&
shell->display->config->use_event_history &&
gdk_device_get_history (mevent->device, mevent->window,
shell->last_read_motion_time + 1,
mevent->time - 1,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment