Package: sweep / 0.9.3-8

0006-fix-gui-artefacts.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
From: Philippe Gauthier <>
Date: Wed, 22 Jun 2011 17:06:30 +0200
Subject: fix gui artefacts

As cursor traverses waveform area of GUI, pointer artifacts persist across GTK ruler,
erased only by change in zoom level.

This patch removes the code in sweep that overrides the feature in Gtk+
to draw the ruler position marker. I don't see if the sweep code does things
differently than in Gtk+, so the simplest fix is to disable and remove the code in
sweep. This is what this patch do.

Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/sweep/+bug/800945
Bug-Debian: http://bugs.debian.org/634679
---
 src/time_ruler.c |   60 ------------------------------------------------------
 1 files changed, 0 insertions(+), 60 deletions(-)

diff --git a/src/time_ruler.c b/src/time_ruler.c
index 57f3002..f0634f0 100644
--- a/src/time_ruler.c
+++ b/src/time_ruler.c
@@ -104,7 +104,6 @@ time_ruler_class_init (TimeRulerClass *klass)
   widget_class->motion_notify_event = time_ruler_motion_notify;
 
   ruler_class->draw_ticks = time_ruler_draw_ticks;
-  ruler_class->draw_pos = time_ruler_draw_pos;
 }
 
 static gfloat ruler_scale[MAXIMUM_SCALES] =
@@ -318,65 +317,6 @@ time_ruler_draw_ticks (GtkRuler *ruler)
    }
 }
 
-static void
-time_ruler_draw_pos (GtkRuler *ruler)
-{
-  GtkWidget *widget;
-  GdkGC *gc;
-  int i;
-  gint x, y;
-  gint width, height;
-  gint bs_width, bs_height;
-  gint xthickness;
-  gint ythickness;
-  gfloat increment;
-
-  g_return_if_fail (ruler != NULL);
-  g_return_if_fail (GTK_IS_TIME_RULER (ruler));
-
-  if (GTK_WIDGET_DRAWABLE (ruler))
-    {
-      widget = GTK_WIDGET (ruler);
-
-      gc = widget->style->fg_gc[GTK_STATE_NORMAL];
-      xthickness = widget->style->xthickness;
-      ythickness = widget->style->ythickness;
-      width = widget->allocation.width;
-      height = widget->allocation.height - ythickness * 2;
-
-      bs_width = height / 2;
-      bs_width |= 1;  /* make sure it's odd */
-      bs_height = bs_width / 2 + 1;
-
-      if ((bs_width > 0) && (bs_height > 0))
-	{
-	  /*  If a backing store exists, restore the ruler  */
-	  if (ruler->backing_store && ruler->non_gr_exp_gc)
-	    gdk_draw_drawable (ruler->widget.window,
-			     ruler->non_gr_exp_gc,
-			     ruler->backing_store,
-			     ruler->xsrc, ruler->ysrc,
-			     ruler->xsrc, ruler->ysrc,
-			     bs_width, bs_height);
-
-	  increment = (gfloat) width / (ruler->upper - ruler->lower);
-
-	  x = ROUND ((ruler->position - ruler->lower) * increment) +
-	    (xthickness - bs_width) / 2 - 1;
-	  y = (height + bs_height) / 2 + ythickness;
-
-	  for (i = 0; i < bs_height; i++)
-	    gdk_draw_line (widget->window, gc,
-			   x + i, y + i,
-			   x + bs_width - 1 - i, y + i);
-
-
-	  ruler->xsrc = x;
-	  ruler->ysrc = y;
-	}
-    }
-}
-
 void
 time_ruler_set_format (TimeRuler * time_ruler, sw_format * f)
 {