Commit a16a8bb4 authored by Jonathan Matthew's avatar Jonathan Matthew 🕳

header: remove left-click workaround for gtk+ 3.5+ (bug #678923)

GtkScale has the right behaviour now.  Keep the workaround for
older versions.
parent 7acd9e10
...@@ -875,12 +875,14 @@ slider_press_callback (GtkWidget *widget, ...@@ -875,12 +875,14 @@ slider_press_callback (GtkWidget *widget,
header->priv->latest_set_time = -1; header->priv->latest_set_time = -1;
g_object_notify (G_OBJECT (header), "slider-dragging"); g_object_notify (G_OBJECT (header), "slider-dragging");
#if !GTK_CHECK_VERSION(3,5,0)
/* HACK: we want the behaviour you get with the middle button, so we /* HACK: we want the behaviour you get with the middle button, so we
* mangle the event. clicking with other buttons moves the slider in * mangle the event. clicking with other buttons moves the slider in
* step increments, clicking with the middle button moves the slider to * step increments, clicking with the middle button moves the slider to
* the location of the click. * the location of the click.
*/ */
event->button = 2; event->button = 2;
#endif
return FALSE; return FALSE;
...@@ -948,8 +950,10 @@ slider_release_callback (GtkWidget *widget, ...@@ -948,8 +950,10 @@ slider_release_callback (GtkWidget *widget,
GdkEventButton *event, GdkEventButton *event,
RBHeader *header) RBHeader *header)
{ {
#if !GTK_CHECK_VERSION(3,5,0)
/* HACK: see slider_press_callback */ /* HACK: see slider_press_callback */
event->button = 2; event->button = 2;
#endif
if (header->priv->slider_dragging == FALSE) { if (header->priv->slider_dragging == FALSE) {
rb_debug ("slider is not dragging"); rb_debug ("slider is not dragging");
......
Markdown is supported
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