Fix compile error on Solaris
Fix few small issues with local move race conditions Add missing --gdi option to command-line help
This commit is contained in:
parent
8e8d62e067
commit
49303c8969
@ -463,9 +463,13 @@ boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app)
|
|||||||
xfw->right = xfw->left + xfw->width - 1;
|
xfw->right = xfw->left + xfw->width - 1;
|
||||||
xfw->bottom = xfw->top + xfw->height - 1;
|
xfw->bottom = xfw->top + xfw->height - 1;
|
||||||
|
|
||||||
if (app)
|
DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%u h=%u send_event=%d",
|
||||||
xf_rail_adjust_position(xfi, window);
|
(uint32) xfw->handle,
|
||||||
|
xfw->left, xfw->top, xfw->right, xfw->bottom,
|
||||||
|
xfw->width, xfw->height, event->xconfigure.send_event);
|
||||||
|
|
||||||
|
if (app && ! event->xconfigure.send_event)
|
||||||
|
xf_rail_adjust_position(xfi, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
@ -590,7 +594,6 @@ boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*event)
|
|||||||
// In this case we must cancel the
|
// In this case we must cancel the
|
||||||
// local move. The event will be
|
// local move. The event will be
|
||||||
// processed below as normal, below.
|
// processed below as normal, below.
|
||||||
xf_rail_end_local_move(xfi, window);
|
|
||||||
break;
|
break;
|
||||||
case VisibilityNotify:
|
case VisibilityNotify:
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
|
@ -306,8 +306,10 @@ void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window)
|
|||||||
window_move.right = xfw->right + 1; // In the update to RDP the position is one past the window
|
window_move.right = xfw->right + 1; // In the update to RDP the position is one past the window
|
||||||
window_move.bottom = xfw->bottom + 1;
|
window_move.bottom = xfw->bottom + 1;
|
||||||
|
|
||||||
DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d}",
|
DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d",
|
||||||
(uint32) xfw->handle, xfw->left, xfw->top, xfw->right, xfw->bottom);
|
(uint32) xfw->handle,
|
||||||
|
xfw->left, xfw->top, xfw->right, xfw->bottom,
|
||||||
|
xfw->width, xfw->height);
|
||||||
|
|
||||||
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &window_move);
|
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &window_move);
|
||||||
|
|
||||||
@ -507,7 +509,7 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channe
|
|||||||
{
|
{
|
||||||
xf_StartLocalMoveSize(xfi, xfw, direction, x, y);
|
xf_StartLocalMoveSize(xfi, xfw, direction, x, y);
|
||||||
} else {
|
} else {
|
||||||
xf_EndLocalMoveSize(xfi, xfw, false);
|
xf_EndLocalMoveSize(xfi, xfw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,17 +473,16 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,
|
|||||||
{
|
{
|
||||||
Window child_window;
|
Window child_window;
|
||||||
|
|
||||||
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
|
if (window->local_move.state != LMS_NOT_ACTIVE)
|
||||||
rdpWindow* wnd = window->window;
|
return;
|
||||||
#endif
|
|
||||||
|
|
||||||
DEBUG_X11_LMS("direction=%d window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d "
|
DEBUG_X11_LMS("direction=%d window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d "
|
||||||
"RDP=0x%X rc={l=%d t=%d} w=%d h=%d mouse_x=%d mouse_y=%d",
|
"RDP=0x%X rc={l=%d t=%d} w=%d h=%d mouse_x=%d mouse_y=%d",
|
||||||
direction, (uint32) window->handle,
|
direction, (uint32) window->handle,
|
||||||
window->left, window->top, window->right, window->bottom,
|
window->left, window->top, window->right, window->bottom,
|
||||||
window->width, window->height, wnd->windowId,
|
window->width, window->height, window->window->windowId,
|
||||||
wnd->windowOffsetX, wnd->windowOffsetY,
|
window->window->windowOffsetX, window->window->windowOffsetY,
|
||||||
wnd->windowWidth, wnd->windowHeight, x, y);
|
window->window->windowWidth, window->window->windowHeight, x, y);
|
||||||
|
|
||||||
window->local_move.root_x = x;
|
window->local_move.root_x = x;
|
||||||
window->local_move.root_y = y;
|
window->local_move.root_y = y;
|
||||||
@ -508,30 +507,28 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,
|
|||||||
1); /* 1 == application request per extended ICCM */
|
1); /* 1 == application request per extended ICCM */
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window, boolean cancel)
|
void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window)
|
||||||
{
|
{
|
||||||
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
|
|
||||||
rdpWindow* wnd = window->window;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DEBUG_X11_LMS("state=%d cancel=%d window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d "
|
DEBUG_X11_LMS("state=%d window=0x%X rc={l=%d t=%d r=%d b=%d} w=%d h=%d "
|
||||||
"RDP=0x%X rc={l=%d t=%d} w=%d h=%d",
|
"RDP=0x%X rc={l=%d t=%d} w=%d h=%d",
|
||||||
window->local_move.state, cancel,
|
window->local_move.state,
|
||||||
(uint32) window->handle, window->left, window->top, window->right, window->bottom,
|
(uint32) window->handle, window->left, window->top, window->right, window->bottom,
|
||||||
window->width, window->height, wnd->windowId,
|
window->width, window->height, window->window->windowId,
|
||||||
wnd->windowOffsetX, wnd->windowOffsetY,
|
window->window->windowOffsetX, window->window->windowOffsetY,
|
||||||
wnd->windowWidth, wnd->windowHeight);
|
window->window->windowWidth, window->window->windowHeight);
|
||||||
|
|
||||||
if (window->local_move.state == LMS_NOT_ACTIVE)
|
if (window->local_move.state == LMS_NOT_ACTIVE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cancel)
|
if (window->local_move.state == LMS_STARTING)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Per ICCM, the X client can ask to cancel an active move. Do this if we
|
* The move never was property started. This can happen due to race
|
||||||
* receive a local move stop from RDP while a local move is in progress
|
* conditions between the mouse button up and the communications to the
|
||||||
|
* RDP server for local moves. We must cancel the X window manager move.
|
||||||
|
* Per ICCM, the X client can ask to cancel an active move.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
xf_SendClientEvent(xfi, window,
|
xf_SendClientEvent(xfi, window,
|
||||||
xfi->_NET_WM_MOVERESIZE, /* request X window manager to abort a local move */
|
xfi->_NET_WM_MOVERESIZE, /* request X window manager to abort a local move */
|
||||||
5, /* 5 arguments to follow */
|
5, /* 5 arguments to follow */
|
||||||
@ -549,27 +546,25 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
|
|||||||
{
|
{
|
||||||
boolean resize = false;
|
boolean resize = false;
|
||||||
|
|
||||||
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
|
|
||||||
rdpWindow* wnd = window->window;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((width * height) < 1)
|
if ((width * height) < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (window->local_move.state != LMS_NOT_ACTIVE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((window->width != width) || (window->height != height))
|
if ((window->width != width) || (window->height != height))
|
||||||
resize = true;
|
resize = true;
|
||||||
|
|
||||||
DEBUG_X11_LMS("window=0x%X current rc={l=%d t=%d r=%d b=%d} w=%u h=%u "
|
if (window->local_move.state == LMS_STARTING ||
|
||||||
|
window->local_move.state == LMS_ACTIVE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%u h=%u "
|
||||||
"new rc={l=%d t=%d r=%d b=%d} w=%u h=%u"
|
"new rc={l=%d t=%d r=%d b=%d} w=%u h=%u"
|
||||||
" RDP=0x%X rc={l=%d t=%d} w=%d h=%d",
|
" RDP=0x%X rc={l=%d t=%d} w=%d h=%d",
|
||||||
(uint32) window->handle, window->left, window->top,
|
(uint32) window->handle, window->left, window->top,
|
||||||
window->right, window->bottom, window->width, window->height,
|
window->right, window->bottom, window->width, window->height,
|
||||||
x, y, x + width -1, y + height -1, width, height, wnd->windowId,
|
x, y, x + width -1, y + height -1, width, height,
|
||||||
wnd->windowOffsetX, wnd->windowOffsetY,
|
window->window->windowId,
|
||||||
wnd->windowWidth, wnd->windowHeight);
|
window->window->windowOffsetX, window->window->windowOffsetY,
|
||||||
|
window->window->windowWidth, window->window->windowHeight);
|
||||||
|
|
||||||
window->left = x;
|
window->left = x;
|
||||||
window->top = y;
|
window->top = y;
|
||||||
@ -582,6 +577,8 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
|
|||||||
XMoveResizeWindow(xfi->display, window->handle, x, y, width, height);
|
XMoveResizeWindow(xfi->display, window->handle, x, y, width, height);
|
||||||
else
|
else
|
||||||
XMoveWindow(xfi->display, window->handle, x, y);
|
XMoveWindow(xfi->display, window->handle, x, y);
|
||||||
|
|
||||||
|
xf_UpdateWindowArea(xfi, window, 0, 0, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state)
|
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state)
|
||||||
|
@ -106,7 +106,7 @@ void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, int maxWidth, int max
|
|||||||
|
|
||||||
|
|
||||||
void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x, int y);
|
void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x, int y);
|
||||||
void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window, boolean cancel);
|
void xf_EndLocalMoveSize(xfInfo *xfi, xfWindow *window);
|
||||||
void xf_SendClientEvent(xfInfo *xfi, xfWindow* window, Atom atom, unsigned int numArgs, ...);
|
void xf_SendClientEvent(xfInfo *xfi, xfWindow* window, Atom atom, unsigned int numArgs, ...);
|
||||||
|
|
||||||
#endif /* __XF_WINDOW_H */
|
#endif /* __XF_WINDOW_H */
|
||||||
|
@ -282,6 +282,7 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TCP_KEEPIDLE
|
||||||
option_value = 5;
|
option_value = 5;
|
||||||
option_len = sizeof(option_value);
|
option_len = sizeof(option_value);
|
||||||
|
|
||||||
@ -290,6 +291,7 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp)
|
|||||||
perror("setsockopt() IPPROTO_TCP, SO_KEEPIDLE:");
|
perror("setsockopt() IPPROTO_TCP, SO_KEEPIDLE:");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -83,6 +83,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
|||||||
" --ext: load an extension\n"
|
" --ext: load an extension\n"
|
||||||
" --no-auth: disable authentication\n"
|
" --no-auth: disable authentication\n"
|
||||||
" --no-fastpath: disable fast-path\n"
|
" --no-fastpath: disable fast-path\n"
|
||||||
|
" --gdi: graphics rendering (hw, sw)\n"
|
||||||
" --no-osb: disable offscreen bitmaps\n"
|
" --no-osb: disable offscreen bitmaps\n"
|
||||||
" --no-bmp-cache: disable bitmap cache\n"
|
" --no-bmp-cache: disable bitmap cache\n"
|
||||||
" --plugin: load a virtual channel plugin\n"
|
" --plugin: load a virtual channel plugin\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user