diff --git a/channels/rdpdr/printer/printer_cups.c b/channels/rdpdr/printer/printer_cups.c
index a5f9dc73e..846cc31d8 100644
--- a/channels/rdpdr/printer/printer_cups.c
+++ b/channels/rdpdr/printer/printer_cups.c
@@ -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
diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c
index 40099745b..1d2a58fde 100644
--- a/client/X11/xf_event.c
+++ b/client/X11/xf_event.c
@@ -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:
diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c
index 4b4baaf17..edd5a74cf 100644
--- a/client/X11/xf_rail.c
+++ b/client/X11/xf_rail.c
@@ -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);
}
}
}
diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c
index 188e85543..a159c6b8a 100644
--- a/client/X11/xf_window.c
+++ b/client/X11/xf_window.c
@@ -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)
diff --git a/client/X11/xf_window.h b/client/X11/xf_window.h
index b59cf4dce..15a2c86d6 100644
--- a/client/X11/xf_window.h
+++ b/client/X11/xf_window.h
@@ -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 */
diff --git a/client/X11/xfreerdp.1.xml b/client/X11/xfreerdp.1.xml
index 1503c3b05..25f0d639c 100644
--- a/client/X11/xfreerdp.1.xml
+++ b/client/X11/xfreerdp.1.xml
@@ -222,8 +222,8 @@
- num - A number that represents a
- bit-mask, were numbers mean the following
+ num - A hexadecimal number that
+ represents a bit-mask, were numbers mean the following
Taken from
MS-RDPBCGR Scetion 2.2.1.11.1.1.1 - Extended Info Packet:
@@ -240,16 +240,16 @@
8: Disable user interface themes.
- 32: Disable mouse cursor shadows.
+ 20: Disable mouse cursor shadows.
- 64: Disable cursor blinking.
+ 40: Disable cursor blinking.
- 128: Enable font smoothing.
+ 80: Enable font smoothing.
- 256: Enable Desktop Composition.
+ 100: Enable Desktop Composition.
diff --git a/libfreerdp-core/connection.c b/libfreerdp-core/connection.c
index 4d1fca6b7..b12ece210 100644
--- a/libfreerdp-core/connection.c
+++ b/libfreerdp-core/connection.c
@@ -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);
diff --git a/libfreerdp-core/peer.c b/libfreerdp-core/peer.c
index 0ebb4e584..e85662da4 100644
--- a/libfreerdp-core/peer.c
+++ b/libfreerdp-core/peer.c
@@ -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:
diff --git a/libfreerdp-core/tcp.c b/libfreerdp-core/tcp.c
index 925e38a74..d4e6fc8e7 100644
--- a/libfreerdp-core/tcp.c
+++ b/libfreerdp-core/tcp.c
@@ -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;
diff --git a/libfreerdp-utils/args.c b/libfreerdp-utils/args.c
index 0baa42892..6b35d8031 100644
--- a/libfreerdp-utils/args.c
+++ b/libfreerdp-utils/args.c
@@ -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"