Detect focus changes and send FOCUS to the server.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/branches/seamlessrdp-branch/rdesktop@1153 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
8d65411c21
commit
b899e2f50f
1
proto.h
1
proto.h
@ -289,6 +289,7 @@ BOOL seamless_init(void);
|
|||||||
void seamless_send_sync(void);
|
void seamless_send_sync(void);
|
||||||
void seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
|
void seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
|
||||||
void seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags);
|
void seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags);
|
||||||
|
void seamless_send_focus(unsigned long id, unsigned long flags);
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
10
seamless.c
10
seamless.c
@ -347,3 +347,13 @@ seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags
|
|||||||
|
|
||||||
seamless_send("ZCHANGE,0x%08lx,0x%08lx,0x%lx\n", id, below, flags);
|
seamless_send("ZCHANGE,0x%08lx,0x%08lx,0x%lx\n", id, below, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
seamless_send_focus(unsigned long id, unsigned long flags)
|
||||||
|
{
|
||||||
|
if (!g_seamless_rdp)
|
||||||
|
return;
|
||||||
|
|
||||||
|
seamless_send("FOCUS,0x%08lx,0x%lx\n", id, flags);
|
||||||
|
}
|
||||||
|
6
xwin.c
6
xwin.c
@ -1912,6 +1912,12 @@ xwin_process_events(void)
|
|||||||
if (g_grab_keyboard && g_mouse_in_wnd)
|
if (g_grab_keyboard && g_mouse_in_wnd)
|
||||||
XGrabKeyboard(g_display, g_wnd, True,
|
XGrabKeyboard(g_display, g_wnd, True,
|
||||||
GrabModeAsync, GrabModeAsync, CurrentTime);
|
GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
|
sw = seamless_get_window_by_wnd(xevent.xfocus.window);
|
||||||
|
if (!sw)
|
||||||
|
break;
|
||||||
|
|
||||||
|
seamless_send_focus(sw->id, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
|
Loading…
Reference in New Issue
Block a user