1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

Fix for linux window repaint problems on the Raspberry Pi.

This commit is contained in:
jules 2015-03-19 15:18:47 +00:00
parent 4058c25da3
commit 0049fdb39c

View file

@ -561,7 +561,7 @@ public:
}
}
if (! usingXShm)
if (! isUsingXShm())
#endif
{
imageDataAllocated.allocate (lineStride * h, format == Image::ARGB && clearImage);
@ -614,7 +614,7 @@ public:
XFreeGC (display, gc);
#if JUCE_USE_XSHM
if (usingXShm)
if (isUsingXShm())
{
XShmDetach (display, &segmentInfo);
@ -709,13 +709,17 @@ public:
// blit results to screen.
#if JUCE_USE_XSHM
if (usingXShm)
if (isUsingXShm())
XShmPutImage (display, (::Drawable) window, gc, xImage, sx, sy, dx, dy, dw, dh, True);
else
#endif
XPutImage (display, (::Drawable) window, gc, xImage, sx, sy, dx, dy, dw, dh);
}
#if JUCE_USE_XSHM
bool isUsingXShm() const noexcept { return usingXShm; }
#endif
private:
//==============================================================================
XImage* xImage;
@ -1926,15 +1930,16 @@ private:
for (const Rectangle<int>* i = originalRepaintRegion.begin(), * const e = originalRepaintRegion.end(); i != e; ++i)
{
XBitmapImage* xbitmap = static_cast<XBitmapImage*> (image.getPixelData());
#if JUCE_USE_XSHM
if (XSHMHelpers::isShmAvailable())
if (xbitmap->isUsingXShm())
++shmPaintsPending;
#endif
static_cast<XBitmapImage*> (image.getPixelData())
->blitToWindow (peer.windowH,
i->getX(), i->getY(), i->getWidth(), i->getHeight(),
i->getX() - totalArea.getX(), i->getY() - totalArea.getY());
xbitmap->blitToWindow (peer.windowH,
i->getX(), i->getY(), i->getWidth(), i->getHeight(),
i->getX() - totalArea.getX(), i->getY() - totalArea.getY());
}
}