Merge pull request #203 from sunds/master

Add pointer update support for RemoteApps
This commit is contained in:
Marc-André Moreau 2011-11-14 15:02:11 -08:00
commit b11252e65d
5 changed files with 18 additions and 3 deletions

View File

@ -411,6 +411,17 @@ boolean xf_event_EnterNotify(xfInfo* xfi, XEvent* event, boolean app)
if (xfi->focused)
XGrabKeyboard(xfi->display, xfi->window->handle, True, GrabModeAsync, GrabModeAsync, CurrentTime);
} else {
// Keep track of which window has focus so that we can apply pointer updates
xfWindow* xfw;
rdpWindow* window;
rdpRail* rail = ((rdpContext*) xfi->context)->rail;
window = window_list_get_by_extra_id(rail->list, (void*) event->xexpose.window);
if (window != NULL)
{
xfw = (xfWindow*) window->extra;
xfi->window = xfw;
}
}
return True;

View File

@ -191,10 +191,12 @@ void xf_Pointer_Set(rdpContext* context, rdpPointer* pointer)
{
xfInfo* xfi = ((xfContext*) context)->xfi;
if (xfi->remote_app != True)
// In remote app mode, window can be null if none has had focus
if (xfi->window != NULL)
{
XDefineCursor(xfi->display, xfi->window->handle, ((xfPointer*) pointer)->cursor);
}
}
/* Glyph Class */
void xf_Glyph_New(rdpContext* context, rdpGlyph* glyph)

View File

@ -364,7 +364,7 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width,
input_mask =
KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
VisibilityChangeMask | FocusChangeMask | StructureNotifyMask |
PointerMotionMask | ExposureMask;
PointerMotionMask | ExposureMask | EnterWindowMask;
XSelectInput(xfi->display, window->handle, input_mask);
XMapWindow(xfi->display, window->handle);

View File

@ -10,6 +10,7 @@ option(WITH_DEBUG_LICENSE "Print license debug messages." OFF)
option(WITH_DEBUG_GDI "Print graphics debug messages." OFF)
option(WITH_DEBUG_RFX "Print RemoteFX debug messages." OFF)
option(WITH_DEBUG_X11 "Print X11 Client debug messages" OFF)
option(WITH_DEBUG_X11_LOCAL_MOVESIZE "Print X11 Client local movesize debug messages" OFF)
option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" OFF)
option(WITH_DEBUG_XV "Print XVideo debug messages" OFF)
option(WITH_DEBUG_SCARD "Print smartcard debug messages" OFF)

View File

@ -33,6 +33,7 @@
#cmakedefine WITH_SSE2
#cmakedefine WITH_SSE2_TARGET
#cmakedefine WITH_DEBUG_X11
#cmakedefine WITH_DEBUG_X11_LOCAL_MOVESIZE
#cmakedefine WITH_DEBUG_RAIL
#cmakedefine WITH_DEBUG_XV
#cmakedefine WITH_DEBUG_SCARD