xfreerdp: add RAIL windows focus in/out handling.
This commit is contained in:
parent
e66542b477
commit
16262074d4
@ -343,6 +343,7 @@ boolean xf_event_FocusIn(xfInfo* xfi, XEvent* event, boolean app)
|
|||||||
if (xfi->mouse_active && (app != True))
|
if (xfi->mouse_active && (app != True))
|
||||||
XGrabKeyboard(xfi->display, xfi->window->handle, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
XGrabKeyboard(xfi->display, xfi->window->handle, True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
|
xf_rail_send_activate(xfi, event->xany.window, True);
|
||||||
xf_kbd_focus_in(xfi);
|
xf_kbd_focus_in(xfi);
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
@ -358,6 +359,8 @@ boolean xf_event_FocusOut(xfInfo* xfi, XEvent* event, boolean app)
|
|||||||
if (event->xfocus.mode == NotifyWhileGrabbed)
|
if (event->xfocus.mode == NotifyWhileGrabbed)
|
||||||
XUngrabKeyboard(xfi->display, CurrentTime);
|
XUngrabKeyboard(xfi->display, CurrentTime);
|
||||||
|
|
||||||
|
xf_rail_send_activate(xfi, event->xany.window, False);
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,6 +210,23 @@ static void xf_send_rail_client_event(rdpChanMan* chanman, uint16 event_type, vo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled)
|
||||||
|
{
|
||||||
|
rdpChanMan* chanman;
|
||||||
|
rdpWindow* rail_window;
|
||||||
|
RAIL_ACTIVATE_ORDER activate;
|
||||||
|
|
||||||
|
chanman = GET_CHANMAN(xfi->instance);
|
||||||
|
rail_window = window_list_get_by_extra_id(xfi->rail->list, (void*)xwindow);
|
||||||
|
|
||||||
|
if (rail_window == NULL) return;
|
||||||
|
|
||||||
|
activate.windowId = rail_window->windowId;
|
||||||
|
activate.enabled = enabled;
|
||||||
|
|
||||||
|
xf_send_rail_client_event(chanman, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
|
||||||
|
}
|
||||||
|
|
||||||
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
|
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
|
||||||
{
|
{
|
||||||
rdpChanMan* chanman;
|
rdpChanMan* chanman;
|
||||||
|
@ -28,6 +28,8 @@ void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail);
|
|||||||
|
|
||||||
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command);
|
void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command);
|
||||||
|
|
||||||
|
void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled);
|
||||||
|
|
||||||
void xf_process_rail_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event);
|
void xf_process_rail_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event);
|
||||||
|
|
||||||
#endif /* __XF_RAIL_H */
|
#endif /* __XF_RAIL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user