Merge pull request #326 from nfedera/railfix2
xfreerdp: a quick workaround for some issues with TS Remote App.
This commit is contained in:
commit
a8765af692
@ -28,6 +28,17 @@
|
||||
#include "xf_window.h"
|
||||
#include "xf_rail.h"
|
||||
|
||||
void xf_rail_enable_remoteapp_mode(xfInfo* xfi)
|
||||
{
|
||||
if (xfi->remote_app == false)
|
||||
{
|
||||
xfi->remote_app = true;
|
||||
xfi->drawable = DefaultRootWindow(xfi->display);
|
||||
xf_DestroyWindow(xfi, xfi->window);
|
||||
xfi->window = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom)
|
||||
{
|
||||
xfWindow* xfw;
|
||||
@ -75,6 +86,8 @@ void xf_rail_CreateWindow(rdpRail* rail, rdpWindow* window)
|
||||
|
||||
xfi = (xfInfo*) rail->extra;
|
||||
|
||||
xf_rail_enable_remoteapp_mode(xfi);
|
||||
|
||||
xfw = xf_CreateWindow((xfInfo*) rail->extra, window,
|
||||
window->windowOffsetX, window->windowOffsetY,
|
||||
window->windowWidth, window->windowHeight,
|
||||
@ -365,6 +378,11 @@ void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChannels* channels, RDP_E
|
||||
{
|
||||
printf("RAIL exec error: execResult=%s NtError=0x%X\n",
|
||||
error_code_names[exec_result->execResult], exec_result->rawResult);
|
||||
xfi->disconnect = True;
|
||||
}
|
||||
else
|
||||
{
|
||||
xf_rail_enable_remoteapp_mode(xfi);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -291,8 +291,6 @@ void xf_create_window(xfInfo* xfi)
|
||||
xfi->attribs.bit_gravity = ForgetGravity;
|
||||
xfi->attribs.win_gravity = StaticGravity;
|
||||
|
||||
if (xfi->remote_app != true)
|
||||
{
|
||||
if (xfi->instance->settings->window_title != NULL)
|
||||
{
|
||||
win_title = xmalloc(sizeof(xfi->instance->settings->window_title));
|
||||
@ -329,11 +327,6 @@ void xf_create_window(xfInfo* xfi)
|
||||
|
||||
XSetWMProtocols(xfi->display, xfi->window->handle, &(xfi->WM_DELETE_WINDOW), 1);
|
||||
xfi->drawable = xfi->window->handle;
|
||||
}
|
||||
else
|
||||
{
|
||||
xfi->drawable = DefaultRootWindow(xfi->display);
|
||||
}
|
||||
}
|
||||
|
||||
void xf_toggle_fullscreen(xfInfo* xfi)
|
||||
@ -567,7 +560,6 @@ boolean xf_pre_connect(freerdp* instance)
|
||||
xfi->mouse_motion = settings->mouse_motion;
|
||||
xfi->complex_regions = true;
|
||||
xfi->decorations = settings->decorations;
|
||||
xfi->remote_app = settings->remote_app;
|
||||
xfi->fullscreen = settings->fullscreen;
|
||||
xfi->grab_keyboard = settings->grab_keyboard;
|
||||
xfi->fullscreen_toggle = true;
|
||||
@ -742,7 +734,6 @@ boolean xf_post_connect(freerdp* instance)
|
||||
|
||||
xf_tsmf_init(xfi, xv_port);
|
||||
|
||||
if (xfi->remote_app != true)
|
||||
xf_cliprdr_init(xfi, channels);
|
||||
|
||||
return true;
|
||||
@ -889,8 +880,11 @@ void xf_window_free(xfInfo* xfi)
|
||||
XFreeGC(xfi->display, xfi->gc);
|
||||
xfi->gc = 0;
|
||||
|
||||
if (xfi->window != NULL)
|
||||
{
|
||||
xf_DestroyWindow(xfi, xfi->window);
|
||||
xfi->window = NULL;
|
||||
}
|
||||
|
||||
if (xfi->primary)
|
||||
{
|
||||
@ -965,7 +959,7 @@ int xfreerdp_run(freerdp* instance)
|
||||
xfi = ((xfContext*) instance->context)->xfi;
|
||||
channels = instance->context->channels;
|
||||
|
||||
while (1)
|
||||
while (!xfi->disconnect)
|
||||
{
|
||||
rcount = 0;
|
||||
wcount = 0;
|
||||
|
@ -107,6 +107,7 @@ struct xf_info
|
||||
xfWorkArea workArea;
|
||||
int current_desktop;
|
||||
boolean remote_app;
|
||||
boolean disconnect;
|
||||
HCLRCONV clrconv;
|
||||
Window parent_window;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user