newer xserver fixes
This commit is contained in:
parent
823547cfd4
commit
466e36d615
@ -25,6 +25,7 @@ keyboard and mouse stuff
|
||||
|
||||
static DeviceIntPtr kbdDevice;
|
||||
static int g_old_button_mask = 0;
|
||||
static int g_caps_lock = 0;
|
||||
extern int g_Bpp; /* from rdpmain.c */
|
||||
extern ScreenPtr g_pScreen; /* from rdpmain.c */
|
||||
extern rdpScreenInfo rdpScreen; /* from rdpmain.c */
|
||||
@ -197,7 +198,33 @@ static KeySym kbdMap[] =
|
||||
XK_KP_0, NoSymbol, /* 114 */
|
||||
XK_Insert, NoSymbol, /* 115 */
|
||||
XK_KP_Delete, NoSymbol, /* 116 */
|
||||
XK_KP_Decimal, NoSymbol /* 117 */
|
||||
XK_KP_Decimal, NoSymbol, /* 117 */
|
||||
XK_A, XK_a, /* 118 */
|
||||
XK_B, XK_b, /* 119 */
|
||||
XK_C, XK_c, /* 120 */
|
||||
XK_D, XK_d, /* 121 */
|
||||
XK_E, XK_e, /* 122 */
|
||||
XK_F, XK_f, /* 123 */
|
||||
XK_G, XK_g, /* 124 */
|
||||
XK_H, XK_h, /* 125 */
|
||||
XK_I, XK_i, /* 126 */
|
||||
XK_J, XK_j, /* 127 */
|
||||
XK_K, XK_k, /* 128 */
|
||||
XK_L, XK_l, /* 129 */
|
||||
XK_M, XK_m, /* 130 */
|
||||
XK_N, XK_n, /* 131 */
|
||||
XK_O, XK_o, /* 132 */
|
||||
XK_P, XK_p, /* 133 */
|
||||
XK_Q, XK_q, /* 134 */
|
||||
XK_R, XK_r, /* 135 */
|
||||
XK_S, XK_s, /* 136 */
|
||||
XK_T, XK_t, /* 137 */
|
||||
XK_U, XK_u, /* 138 */
|
||||
XK_V, XK_v, /* 139 */
|
||||
XK_W, XK_w, /* 140 */
|
||||
XK_X, XK_x, /* 141 */
|
||||
XK_Y, XK_y, /* 142 */
|
||||
XK_Z, XK_z /* 143 */
|
||||
|
||||
};
|
||||
|
||||
@ -699,6 +726,8 @@ KbdAddEvent(int down, int param1, int param2, int param3, int param4)
|
||||
}
|
||||
break;
|
||||
case 30: /* a */
|
||||
/*ch = g_caps_lock ? 118 : 38;*/
|
||||
/*ch = 118;*/
|
||||
ch = 38;
|
||||
break;
|
||||
case 31: /* s */
|
||||
@ -798,6 +827,7 @@ KbdAddEvent(int down, int param1, int param2, int param3, int param4)
|
||||
break;
|
||||
case 58: /* caps lock */
|
||||
ch = 91;
|
||||
g_caps_lock = down;
|
||||
break;
|
||||
case 59: /* F1 */
|
||||
ch = 77;
|
||||
|
@ -265,12 +265,45 @@ rdpup_process_msg(struct stream* s)
|
||||
in_uint32_le(s, param4);
|
||||
DEBUG_OUT_UP(("rdpup_process_msg - msg %d param1 %d param2 %d param3 %d \
|
||||
param4 %d\n", msg, param1, param2, param3, param4));
|
||||
/*ErrorF("rdpup_process_msg - msg %d param1 %d param2 %d param3 %d \
|
||||
param4 %d\n", msg, param1, param2, param3, param4);*/
|
||||
switch (msg)
|
||||
{
|
||||
case 15: /* key down */
|
||||
case 16: /* key up */
|
||||
KbdAddEvent(msg == 15, param1, param2, param3, param4);
|
||||
break;
|
||||
case 17: /* from RDP_INPUT_SYNCHRONIZE */
|
||||
#if 0
|
||||
/* scroll lock */
|
||||
if (param1 & 1)
|
||||
{
|
||||
KbdAddEvent(1, 70, 0, 70, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
KbdAddEvent(0, 70, 49152, 70, 49152);
|
||||
}
|
||||
/* num lock */
|
||||
if (param1 & 2)
|
||||
{
|
||||
KbdAddEvent(1, 69, 0, 69, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
KbdAddEvent(0, 69, 49152, 69, 49152);
|
||||
}
|
||||
/* caps lock */
|
||||
if (param1 & 4)
|
||||
{
|
||||
KbdAddEvent(1, 58, 0, 58, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
KbdAddEvent(0, 58, 49152, 58, 49152);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case 100:
|
||||
g_cursor_x = param1;
|
||||
g_cursor_y = param2;
|
||||
@ -393,8 +426,9 @@ rdpup_check(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorF("rejecting connection - maybe\n");
|
||||
/* g_tcp_close(g_tcp_accept(g_listen_sck));*/
|
||||
ErrorF("rejecting connection\n");
|
||||
g_sleep(10);
|
||||
g_tcp_close(g_tcp_accept(g_listen_sck));
|
||||
}
|
||||
}
|
||||
if (sel & 2)
|
||||
|
Loading…
Reference in New Issue
Block a user