Merge branch 'master' of github.com:FreeRDP/FreeRDP

This commit is contained in:
Marc-André Moreau 2011-12-18 12:11:05 -05:00
commit b913b1d1b8
10 changed files with 58 additions and 50 deletions

View File

@ -175,7 +175,7 @@ static rdpPrintJob* printer_cups_create_printjob(rdpPrinter* printer, uint32 id)
}
cupsStartDocument((http_t*)cups_printjob->printjob_object,
printer->name, cups_printjob->printjob_id, buf,
CUPS_FORMAT_POSTSCRIPT, 1);
CUPS_FORMAT_AUTO, 1);
}
#endif

View File

@ -463,9 +463,13 @@ boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app)
xfw->right = xfw->left + xfw->width - 1;
xfw->bottom = xfw->top + xfw->height - 1;
if (app)
xf_rail_adjust_position(xfi, window);
DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d} w=%u h=%u send_event=%d",
(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;
@ -590,7 +594,6 @@ boolean xf_event_suppress_events(xfInfo *xfi, rdpWindow *window, XEvent*event)
// In this case we must cancel the
// local move. The event will be
// processed below as normal, below.
xf_rail_end_local_move(xfi, window);
break;
case VisibilityNotify:
case PropertyNotify:

View File

@ -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.bottom = xfw->bottom + 1;
DEBUG_X11_LMS("window=0x%X rc={l=%d t=%d r=%d b=%d}",
(uint32) xfw->handle, xfw->left, xfw->top, xfw->right, xfw->bottom);
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,
xfw->width, xfw->height);
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);
} else {
xf_EndLocalMoveSize(xfi, xfw, false);
xf_EndLocalMoveSize(xfi, xfw);
}
}
}

View File

@ -473,17 +473,16 @@ void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, int direction, int x,
{
Window child_window;
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif
if (window->local_move.state != LMS_NOT_ACTIVE)
return;
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",
direction, (uint32) window->handle,
window->left, window->top, window->right, window->bottom,
window->width, window->height, wnd->windowId,
wnd->windowOffsetX, wnd->windowOffsetY,
wnd->windowWidth, wnd->windowHeight, x, y);
window->width, window->height, window->window->windowId,
window->window->windowOffsetX, window->window->windowOffsetY,
window->window->windowWidth, window->window->windowHeight, x, y);
window->local_move.root_x = x;
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 */
}
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",
window->local_move.state, cancel,
window->local_move.state,
(uint32) window->handle, window->left, window->top, window->right, window->bottom,
window->width, window->height, wnd->windowId,
wnd->windowOffsetX, wnd->windowOffsetY,
wnd->windowWidth, wnd->windowHeight);
window->width, window->height, window->window->windowId,
window->window->windowOffsetX, window->window->windowOffsetY,
window->window->windowWidth, window->window->windowHeight);
if (window->local_move.state == LMS_NOT_ACTIVE)
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
* receive a local move stop from RDP while a local move is in progress
* The move never was property started. This can happen due to race
* 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,
xfi->_NET_WM_MOVERESIZE, /* request X window manager to abort a local move */
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;
#ifdef WITH_DEBUG_X11_LOCAL_MOVESIZE
rdpWindow* wnd = window->window;
#endif
if ((width * height) < 1)
return;
if (window->local_move.state != LMS_NOT_ACTIVE)
return;
if ((window->width != width) || (window->height != height))
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"
" RDP=0x%X rc={l=%d t=%d} w=%d h=%d",
(uint32) window->handle, window->left, window->top,
window->right, window->bottom, window->width, window->height,
x, y, x + width -1, y + height -1, width, height, wnd->windowId,
wnd->windowOffsetX, wnd->windowOffsetY,
wnd->windowWidth, wnd->windowHeight);
x, y, x + width -1, y + height -1, width, height,
window->window->windowId,
window->window->windowOffsetX, window->window->windowOffsetY,
window->window->windowWidth, window->window->windowHeight);
window->left = x;
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);
else
XMoveWindow(xfi->display, window->handle, x, y);
xf_UpdateWindowArea(xfi, window, 0, 0, width, height);
}
void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state)

View File

@ -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_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, ...);
#endif /* __XF_WINDOW_H */

View File

@ -222,8 +222,8 @@
</listitem>
<listitem>
<para>
<replaceable class="parameter">num</replaceable> - A number that represents a
bit-mask, were numbers mean the following
<replaceable class="parameter">num</replaceable> - A hexadecimal number that
represents a bit-mask, were numbers mean the following
<footnote><para>Taken from <ulink url="http://msdn.microsoft.com/en-us/library/cc240476%28v=prot.10%29.aspx">
MS-RDPBCGR Scetion 2.2.1.11.1.1.1 - Extended Info Packet</ulink></para></footnote>:
<itemizedlist>
@ -240,16 +240,16 @@
<para>8: Disable user interface themes.</para>
</listitem>
<listitem>
<para>32: Disable mouse cursor shadows.</para>
<para>20: Disable mouse cursor shadows.</para>
</listitem>
<listitem>
<para>64: Disable cursor blinking.</para>
<para>40: Disable cursor blinking.</para>
</listitem>
<listitem>
<para>128: Enable font smoothing.</para>
<para>80: Enable font smoothing.</para>
</listitem>
<listitem>
<para>256: Enable Desktop Composition.</para>
<para>100: Enable Desktop Composition.</para>
</listitem>
</itemizedlist>
</para>

View File

@ -566,12 +566,8 @@ boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s)
{
/**
* During reactivation sequence the client might sent some input before receiving
* the Deactivate All PDU. We need to ignore those noises here.
*/
if (!rdp_recv_confirm_active(rdp, s))
return true;
return false;
rdp->state = CONNECTION_STATE_ACTIVE;
update_reset_state(rdp->update);

View File

@ -224,7 +224,14 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr
case CONNECTION_STATE_LICENSE:
if (!rdp_server_accept_confirm_active(client->context->rdp, s))
return false;
{
/**
* During reactivation sequence the client might sent some input or channel data
* before receiving the Deactivate All PDU. We need to process them as usual.
*/
stream_set_pos(s, 0);
return peer_recv_pdu(client, s);
}
break;
case CONNECTION_STATE_ACTIVE:

View File

@ -282,6 +282,7 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp)
return false;
}
#ifdef TCP_KEEPIDLE
option_value = 5;
option_len = sizeof(option_value);
@ -290,6 +291,7 @@ boolean tcp_set_keep_alive_mode(rdpTcp* tcp)
perror("setsockopt() IPPROTO_TCP, SO_KEEPIDLE:");
return false;
}
#endif
#endif
return true;

View File

@ -83,6 +83,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
" --ext: load an extension\n"
" --no-auth: disable authentication\n"
" --no-fastpath: disable fast-path\n"
" --gdi: graphics rendering (hw, sw)\n"
" --no-osb: disable offscreen bitmaps\n"
" --no-bmp-cache: disable bitmap cache\n"
" --plugin: load a virtual channel plugin\n"