View | Details | Raw Unified | Return to bug 37269 | Differences between
and this patch

Collapse All | Expand All

(-)italc-2.0.0_orig//lib/src/ItalcVncConnection.cpp (-16 / +20 lines)
 Lines 118-139    Link Here 
118
118
119
	const int size = (int) cl->width * cl->height *
119
	const int size = (int) cl->width * cl->height *
120
					( cl->format.bitsPerPixel / 8 );
120
					( cl->format.bitsPerPixel / 8 );
121
	if( t->m_frameBuffer )
121
	if(t->m_image.width() != cl->width &&
122
	{
122
            t->m_image.height() != cl->height)
123
		// do not leak if we get a new framebuffer size
123
    {   
124
		delete [] t->m_frameBuffer;
124
        if( t->m_frameBuffer )
125
	}
125
        {   
126
	t->m_frameBuffer = new uint8_t[size];
126
            // do not leak if we get a new framebuffer size
127
	t->m_framebufferInitialized = false;
127
            delete [] t->m_frameBuffer;
128
	cl->frameBuffer = t->m_frameBuffer;
128
        }   
129
	memset( cl->frameBuffer, '\0', size );
129
        t->m_frameBuffer = new uint8_t[size];
130
	cl->format.bitsPerPixel = 32;
130
        t->m_framebufferInitialized = false;
131
	cl->format.redShift = 16;
131
        cl->frameBuffer = t->m_frameBuffer;
132
	cl->format.greenShift = 8;
132
        memset( cl->frameBuffer, '\0', size );
133
	cl->format.blueShift = 0;
133
        cl->format.bitsPerPixel = 32; 
134
	cl->format.redMax = 0xff;
134
        cl->format.redShift = 16; 
135
	cl->format.greenMax = 0xff;
135
        cl->format.greenShift = 8;
136
	cl->format.blueMax = 0xff;
136
        cl->format.blueShift = 0;
137
        cl->format.redMax = 0xff;
138
        cl->format.greenMax = 0xff;
139
        cl->format.blueMax = 0xff;
140
    }   
137
141
138
	// only use remote cursor for remote control
142
	// only use remote cursor for remote control
139
	cl->appData.useRemoteCursor = false;
143
	cl->appData.useRemoteCursor = false;

Return to bug 37269