ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/clip_macosx.cpp
(Generate patch)

Comparing BasiliskII/src/MacOSX/clip_macosx.cpp (file contents):
Revision 1.7 by gbeauche, 2008-01-01T09:40:32Z vs.
Revision 1.8 by asvitkine, 2009-10-18T01:22:33Z

# Line 160 | Line 160 | void GetScrap(void **handle, uint32 type
160  
161   void PutScrap(uint32 type, void *scrap, int32 length)
162   {
163 <        D(bug("PutScrap type %08lx, data %08lx, length %ld\n", type, scrap, length));
163 >        static bool clear = true;
164 >        D(bug("PutScrap type %4.4s, data %08lx, length %ld\n", &type, scrap, length));
165          ScrapRef theScrap;
166  
167          if (we_put_this_data) {
168                  we_put_this_data = false;
169 +                clear = true;
170                  return;
171          }
172          if (length <= 0)
173                  return;
174  
175 <        ClearCurrentScrap();
175 >        if (clear) {
176 >                D(bug(" calling ClearCurrentScrap\n"));
177 >                ClearCurrentScrap();
178 >        }
179          if (GetCurrentScrap(&theScrap) != noErr) {
180                  D(bug(" could not open scrap\n"));
181                  return;
# Line 179 | Line 184 | void PutScrap(uint32 type, void *scrap,
184          SwapScrapData(type, scrap, length, TRUE);
185          if (PutScrapFlavor(theScrap, type, kScrapFlavorMaskNone, length, scrap) != noErr) {
186                  D(bug(" could not put to scrap\n"));
187 <                return;
187 >                //return;
188          }
189 +        SwapScrapData(type, scrap, length, FALSE); // swap it back
190   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines