Fix wxX11 crash
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,7 +103,7 @@ public:
|
|||||||
virtual wxSize GetPPI() const;
|
virtual wxSize GetPPI() const;
|
||||||
|
|
||||||
virtual void DestroyClippingRegion();
|
virtual void DestroyClippingRegion();
|
||||||
WXWindow X11GetWindow() const { return m_window; }
|
WXWindow GetX11Window() const { return m_x11window; }
|
||||||
|
|
||||||
virtual void ComputeScaleAndOrigin();
|
virtual void ComputeScaleAndOrigin();
|
||||||
|
|
||||||
|
@@ -1255,7 +1255,7 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap,
|
|||||||
else
|
else
|
||||||
XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_x11window,
|
XCopyArea( (Display*) m_display, (Pixmap) use_bitmap.GetPixmap(), (Window) m_x11window,
|
||||||
(GC) m_penGC, 0, 0, ww, hh, xx, yy );
|
(GC) m_penGC, 0, 0, ww, hh, xx, yy );
|
||||||
|
|
||||||
// remove mask again if any
|
// remove mask again if any
|
||||||
if (setClipMask)
|
if (setClipMask)
|
||||||
{
|
{
|
||||||
@@ -1458,7 +1458,6 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoor
|
|||||||
|
|
||||||
// Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
|
// Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
|
||||||
// drawing a mono-bitmap (XBitmap) we use the current text GC
|
// drawing a mono-bitmap (XBitmap) we use the current text GC
|
||||||
|
|
||||||
if (is_mono)
|
if (is_mono)
|
||||||
XCopyPlane( (Display*) m_display, (Pixmap) use_bitmap.GetBitmap(), (Window) m_x11window,
|
XCopyPlane( (Display*) m_display, (Pixmap) use_bitmap.GetBitmap(), (Window) m_x11window,
|
||||||
(GC) m_textGC, xsrc, ysrc, width, height, xx, yy, 1 );
|
(GC) m_textGC, xsrc, ysrc, width, height, xx, yy, 1 );
|
||||||
@@ -1514,7 +1513,7 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoor
|
|||||||
|
|
||||||
// copy including child window contents
|
// copy including child window contents
|
||||||
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, IncludeInferiors );
|
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, IncludeInferiors );
|
||||||
XCopyArea( (Display*) m_display, (Window) x11_impl->X11GetWindow(), (Window) bitmap.GetPixmap(),
|
XCopyArea( (Display*) m_display, (Window) x11_impl->GetX11Window(), (Window) bitmap.GetPixmap(),
|
||||||
(GC) m_penGC, xsrc, ysrc, width, height, 0, 0 );
|
(GC) m_penGC, xsrc, ysrc, width, height, 0, 0 );
|
||||||
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, ClipByChildren );
|
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, ClipByChildren );
|
||||||
|
|
||||||
@@ -1532,10 +1531,9 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoor
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No scaling and not a memory dc with a mask either
|
// No scaling and not a memory dc with a mask either
|
||||||
|
|
||||||
// copy including child window contents
|
// copy including child window contents
|
||||||
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, IncludeInferiors );
|
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, IncludeInferiors );
|
||||||
XCopyArea( (Display*) m_display, (Window) x11_impl->X11GetWindow(), (Window) m_x11window,
|
XCopyArea( (Display*) m_display, (Window) x11_impl->GetX11Window(), (Window) m_x11window,
|
||||||
(GC) m_penGC, xsrc, ysrc, width, height, xx, yy );
|
(GC) m_penGC, xsrc, ysrc, width, height, xx, yy );
|
||||||
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, ClipByChildren );
|
XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, ClipByChildren );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user