~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/widgets/view.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2010-11-17 21:43:38 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101117214338-1hvfl7oo2dsqnvrb
Tags: 1.1-0ubuntu1
* New upstream release (LP: #668631)
* Switch to dpkg-source 3.0 (quilt) format
* Switch to dh7 short form
* debian/rules:
  - added --enable-dssi and --enable-osc to conf flags for dssi support
  - added -ljackserver to LDFLAGS to fix a FTBFS because of --as-needed
* debian/control:
  - added build build dependency on liblo-dev and dssi-dev for dssi support
  - bump Standards-version to 3.9.1. No changes required.
* debian/muse.desktop, debian/muse.xpm: dropped as desktop file and icon is
  now shipped upstream.
* fix-desktop-categories.patch: fix Categories tag in upstream desktop file
* 10_es_locale_fix.dpatch: refreshed and converted to quilt as
  fix_es_locale.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
      if (pm.isNull())
74
74
            return;
75
75
      if (!pmValid) {
76
 
            // Added by Tim. p3.3.6
77
76
            //printf("View::setXPos !pmValid x:%d width:%d delta:%d\n", x, width(), delta);
78
 
      
79
77
            redraw();
80
78
            return;
81
79
            }
100
98
      r |= olr;
101
99
      r |= olr1;
102
100
      
103
 
      // Added by Tim. p3.3.6
104
101
      //printf("View::setXPos x:%d w:%d delta:%d r.x:%d r.w:%d\n", x, w, delta, r.x(), r.width());
105
102
      
106
103
      paint(r);
118
115
      if (pm.isNull())
119
116
            return;
120
117
      if (!pmValid) {
121
 
            // Added by Tim. p3.3.6
122
118
            //printf("View::setYPos !pmValid y:%d height:%d delta:%d\n", y, height(), delta);
123
119
            
124
120
            redraw();
135
131
            }
136
132
      else {                  // shift down
137
133
            bitBlt(&pm,  0, delta, &pm, 0, 0, w, h-delta, CopyROP, true);
138
 
            r = QRect(0, 0, w, delta);
 
134
            
 
135
            // NOTE: June 2 2010: On my machine with an old NV V8200 + prop drivers (curr 96.43.11),
 
136
            //  this is a problem. There is severe graphical corruption in some of the view-based windows.
 
137
            // Not just here but several other windows (ex. ladspa browser). 
 
138
            // I believe (?) I saw other QT3 apps exhibit this problem, too. QT4 apps don't do it. 
 
139
            // Neither does it happen when xorg drivers used. 
 
140
            //
 
141
            // However, there is one type of MusE corruption which ALL drivers seem to show, and that is
 
142
            //  the arranger 'grey' non-part-based tracks (Input, Output, Group etc.).
 
143
            // It is also observed on another machine with an ATI card and a different linux distro.
 
144
            // This change also fixes that problem, although the fact that xorg drivers show the problem
 
145
            //  had long made me believe that it was our drawing technique, not particularly this line.
 
146
            // Meaning that perhaps this line is not the right way to fix that problem.
 
147
            //
 
148
            // On the other hand the two problems may be related, and only one shows with xorg drivers... 
 
149
            // Ultimately it could just be my NV card, as a request for similar experience in mail list
 
150
            //  returned all negative.
 
151
            //
 
152
            // FIXME: This change cures it for me, but we shouldn't leave this in - shouldn't need to do this...
 
153
            //
 
154
            //r = QRect(0, 0, w, delta);
 
155
            // Changed p3.3.43
 
156
            r = QRect(0, 0, w, h);
 
157
            
139
158
            }
140
159
      QRect olr = overlayRect();
141
160
      QRect olr1(olr);
163
182
 
164
183
void View::paintEvent(QPaintEvent* ev)
165
184
      {
166
 
      // Added by Tim. p3.3.6
167
185
      //printf("View::paintEvent pmValid:%d x:%d width:%d y:%d height:%d\n", pmValid, ev->rect().x(), ev->rect().width(), ev->rect().y(), ev->rect().height());
168
 
      
169
186
      if (!pmValid)
170
187
            paint(ev->rect());
171
188
      bitBlt(this, ev->rect().topLeft(), &pm, ev->rect(), CopyROP, true);
178
195
void View::redraw()
179
196
      {
180
197
      QRect r(0, 0, pm.width(), pm.height());
181
 
      // Added by Tim. p3.3.6
182
198
      //printf("View::redraw() r.x:%d r.w:%d\n", r.x(), r.width());
183
 
      
184
199
      paint(r);
185
200
      update();
186
201
      }
191
206
 
192
207
void View::redraw(const QRect& r)
193
208
      {
194
 
      // Added by Tim. p3.3.6
195
209
      //printf("View::redraw(QRect& r) r.x:%d r.w:%d\n", r.x(), r.width());
196
 
      
197
210
      paint(r);
198
211
      update(r);
199
212
      }
219
232
            p.drawTiledPixmap(rr, bgPixmap, QPoint(xpos + rmapx(xorg)
220
233
               + rr.x(), ypos + rmapy(yorg) + rr.y()));
221
234
      p.setClipRegion(rr);
222
 
      // Added by Tim. p3.3.6
223
235
      //printf("View::paint r.x:%d w:%d\n", rr.x(), rr.width());
224
 
      
225
236
      pdraw(p, rr);       // draw into pixmap
226
237
 
227
238
      p.resetXForm();