Merge pull request #3934 from ilammy/x11-cliprdr/rail-support

Teach RAIL to use clipboard redirection
This commit is contained in:
Bernhard Miklautz 2017-05-02 13:03:37 +02:00 committed by GitHub
commit a10120639f
5 changed files with 19 additions and 6 deletions

View File

@ -585,7 +585,7 @@ BOOL xf_create_window(xfContext* xfc)
}
else
{
xfc->drawable = DefaultRootWindow(xfc->display);
xfc->drawable = xf_CreateDummyWindow(xfc);
}
ZeroMemory(&gcv, sizeof(gcv));

View File

@ -1061,10 +1061,7 @@ BOOL xf_event_process(freerdp* instance, XEvent* event)
break;
}
if (!xfc->remote_app)
{
xf_cliprdr_handle_xevent(xfc, event);
}
xf_cliprdr_handle_xevent(xfc, event);
xf_input_handle_event(xfc, event);
XSync(xfc->display, FALSE);

View File

@ -64,7 +64,7 @@ void xf_rail_enable_remoteapp_mode(xfContext* xfc)
if (!xfc->remote_app)
{
xfc->remote_app = TRUE;
xfc->drawable = DefaultRootWindow(xfc->display);
xfc->drawable = xf_CreateDummyWindow(xfc);
xf_DestroyDesktopWindow(xfc, xfc->window);
xfc->window = NULL;
}
@ -75,6 +75,7 @@ void xf_rail_disable_remoteapp_mode(xfContext* xfc)
if (xfc->remote_app)
{
xfc->remote_app = FALSE;
xf_DestroyDummyWindow(xfc, xfc->drawable);
xf_create_window(xfc);
}
}

View File

@ -336,6 +336,18 @@ static const char* get_shm_id()
return shm_id;
}
Window xf_CreateDummyWindow(xfContext *xfc)
{
return XCreateSimpleWindow(xfc->display, DefaultRootWindow(xfc->display),
0, 0, 1, 1, 0, 0, 0);
}
void xf_DestroyDummyWindow(xfContext *xfc, Window window)
{
if (window)
XDestroyWindow(xfc->display, window);
}
xfWindow* xf_CreateDesktopWindow(xfContext* xfc, char* name, int width,
int height)
{

View File

@ -150,6 +150,9 @@ xfWindow* xf_CreateDesktopWindow(xfContext* xfc, char* name, int width, int heig
void xf_ResizeDesktopWindow(xfContext* xfc, xfWindow* window, int width, int height);
void xf_DestroyDesktopWindow(xfContext* xfc, xfWindow* window);
Window xf_CreateDummyWindow(xfContext* xfc);
void xf_DestroyDummyWindow(xfContext* xfc, Window window);
BOOL xf_GetWindowProperty(xfContext* xfc, Window window, Atom property, int length,
unsigned long* nitems, unsigned long* bytes, BYTE** prop);
void xf_SendClientEvent(xfContext* xfc, Window window, Atom atom, unsigned int numArgs, ...);