This patch adds the -X option that used to be present in rdesktop and which allows the xfreerdp window to be embedded within another X window. --- X11/xf_types.h | 1 + X11/xf_win.c | 3 +++ X11/xfreerdp.c | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/X11/xf_types.h b/X11/xf_types.h index 45c9eca..f7bc579 100644 --- a/X11/xf_types.h +++ b/X11/xf_types.h @@ -54,6 +54,7 @@ struct xf_info int decoration; /* X11 stuff */ + Window embed; Window wnd; GC gc; Display * display; diff --git a/X11/xf_win.c b/X11/xf_win.c index 6c7fa19..a176d24 100644 --- a/X11/xf_win.c +++ b/X11/xf_win.c @@ -1058,6 +1058,9 @@ xf_post_connect(xfInfo * xfi) snprintf(win_title, sizeof(win_title), "%s:%d - freerdp", xfi->settings->server, xfi->settings->tcp_port_rdp); XStoreName(xfi->display, xfi->wnd, win_title); + if (xfi->embed) + XReparentWindow(xfi->display, xfi->wnd, xfi->embed, 0, 0); + input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | VisibilityChangeMask | FocusChangeMask | StructureNotifyMask | diff --git a/X11/xfreerdp.c b/X11/xfreerdp.c index 6d2ed43..4ce2a9b 100644 --- a/X11/xfreerdp.c +++ b/X11/xfreerdp.c @@ -103,6 +103,7 @@ out_args(void) "\t-D: hide window decorations\n" "\t-z: enable bulk compression\n" "\t-x: performance flags (m, b or l for modem, broadband or lan)\n" + "\t-X: embed into another window with a given XID.\n" #ifndef DISABLE_TLS "\t--no-tls: disable TLS encryption\n" #endif @@ -347,6 +348,19 @@ process_params(xfInfo * xfi, int argc, char ** argv, int * pindex) { settings->performanceflags = strtol(argv[*pindex], 0, 16); } + } else if (strcmp("-X", argv[*pindex]) == 0) { + *pindex = *pindex + 1; + + if (*pindex == argc) { + printf("missing XID\n"); + return 1; + } + + xfi->embed = strtoul(argv[*pindex], NULL, 16); + if (!xfi->embed) { + printf("bad XID\n"); + return 1; + } } #ifndef DISABLE_TLS else if (strcmp("--no-tls", argv[*pindex]) == 0) ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Freerdp-devel mailing list Freerdp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freerdp-devel