mirror of https://github.com/FreeRDP/FreeRDP
Port to Solaris 10u9.
Added -lrt which is a required library for the sem_*() functions Fixed xf_window.c to not return null for zero-width windows - rather coerce values to be valid as was already being done for height and width. This fixes intermittent crashs on Solars and Linux.
This commit is contained in:
parent
f714af7659
commit
7322ef8047
|
@ -278,6 +278,14 @@ void xf_FixWindowCoordinates(xfInfo* xfi, int* x, int* y, int* width, int* heigh
|
|||
vscreen_width = xfi->vscreen.area.right - xfi->vscreen.area.left + 1;
|
||||
vscreen_height = xfi->vscreen.area.bottom - xfi->vscreen.area.top + 1;
|
||||
|
||||
if (*width < 1)
|
||||
{
|
||||
*width = 1;
|
||||
}
|
||||
if (*height < 1)
|
||||
{
|
||||
*height = 1;
|
||||
}
|
||||
if (*x < xfi->vscreen.area.left)
|
||||
{
|
||||
*width += *x;
|
||||
|
@ -306,9 +314,6 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width,
|
|||
|
||||
window = (xfWindow*) xzalloc(sizeof(xfWindow));
|
||||
|
||||
if ((width * height) < 1)
|
||||
return NULL;
|
||||
|
||||
xf_FixWindowCoordinates(xfi, &x, &y, &width, &height);
|
||||
|
||||
window->left = x;
|
||||
|
@ -318,8 +323,6 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width,
|
|||
window->width = width;
|
||||
window->height = height;
|
||||
|
||||
if (window != NULL)
|
||||
{
|
||||
XGCValues gcv;
|
||||
int input_mask;
|
||||
XClassHint* class_hints;
|
||||
|
@ -365,7 +368,6 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width,
|
|||
window->surface = XCreatePixmap(xfi->display, window->handle, window->width, window->height, xfi->depth);
|
||||
|
||||
xf_MoveWindow(xfi, window, x, y, width, height);
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
|
|
@ -60,5 +60,8 @@ target_link_libraries(freerdp-utils ${CMAKE_THREAD_LIBS_INIT})
|
|||
if(WIN32)
|
||||
target_link_libraries(freerdp-utils ws2_32)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
|
||||
target_link_libraries(freerdp-utils rt)
|
||||
endif()
|
||||
|
||||
install(TARGETS freerdp-utils DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
|
Loading…
Reference in New Issue