270 |
Screen *screen; |
Screen *screen; |
271 |
uint16 test; |
uint16 test; |
272 |
int i; |
int i; |
273 |
|
XEvent xevent; |
274 |
|
|
275 |
x_socket = ConnectionNumber(display); |
x_socket = ConnectionNumber(display); |
276 |
screen = DefaultScreenOfDisplay(display); |
screen = DefaultScreenOfDisplay(display); |
355 |
|
|
356 |
xkeymap_init2(); |
xkeymap_init2(); |
357 |
|
|
358 |
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask; |
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | |
359 |
|
VisibilityChangeMask | FocusChangeMask; |
360 |
if (grab_keyboard) |
if (grab_keyboard) |
361 |
input_mask |= EnterWindowMask | LeaveWindowMask; |
input_mask |= EnterWindowMask | LeaveWindowMask; |
362 |
if (sendmotion) |
if (sendmotion) |
377 |
|
|
378 |
XMapWindow(display, wnd); |
XMapWindow(display, wnd); |
379 |
|
|
380 |
|
/* Wait for VisibilityNotify Event */ |
381 |
|
for (;;) { |
382 |
|
XNextEvent(display, &xevent); |
383 |
|
if (xevent.type == VisibilityNotify) |
384 |
|
break; |
385 |
|
} |
386 |
|
|
387 |
|
/* clear the window so that cached data is not viewed upon start... */ |
388 |
|
XSetBackground(display, gc, 0); |
389 |
|
XSetForeground(display, gc, 0); |
390 |
|
FILL_RECTANGLE(0, 0, width, height); |
391 |
|
|
392 |
return True; |
return True; |
393 |
} |
} |
394 |
|
|
531 |
|
|
532 |
case FocusOut: |
case FocusOut: |
533 |
/* reset keys */ |
/* reset keys */ |
534 |
rdp_send_input(ev_time, RDP_INPUT_SCANCODE, |
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LCTRL); |
535 |
KBD_FLAG_DOWN | KBD_FLAG_UP, SCANCODE_CHAR_LCTRL, 0); |
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LALT); |
536 |
rdp_send_input(ev_time, RDP_INPUT_SCANCODE, |
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_LSHIFT); |
537 |
KBD_FLAG_DOWN | KBD_FLAG_UP, SCANCODE_CHAR_LALT, 0); |
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RCTRL); |
538 |
|
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RALT); |
539 |
|
rdp_send_scancode(ev_time, RDP_KEYRELEASE, SCANCODE_CHAR_RSHIFT); |
540 |
/* fall through */ |
/* fall through */ |
541 |
case LeaveNotify: |
case LeaveNotify: |
542 |
if (grab_keyboard) |
if (grab_keyboard) |