/[rdesktop]/sourceforge.net/trunk/rdesktop/xwin.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/xwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 84 by astrand, Tue Jul 30 07:30:12 2002 UTC revision 99 by jsorg71, Tue Aug 20 01:20:08 2002 UTC
# Line 270  ui_create_window(char *title) Line 270  ui_create_window(char *title)
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);
# Line 354  ui_create_window(char *title) Line 355  ui_create_window(char *title)
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)
# Line 375  ui_create_window(char *title) Line 377  ui_create_window(char *title)
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    
# Line 517  xwin_process_events() Line 531  xwin_process_events()
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)

Legend:
Removed from v.84  
changed lines
  Added in v.99

  ViewVC Help
Powered by ViewVC 1.1.26