/[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 100 by jsorg71, Sat Aug 24 20:04:56 2002 UTC revision 101 by astrand, Mon Aug 26 17:12:43 2002 UTC
# Line 277  ui_create_window_obj(int xpos, int ypos, Line 277  ui_create_window_obj(int xpos, int ypos,
277          screen = DefaultScreenOfDisplay(display);          screen = DefaultScreenOfDisplay(display);
278    
279          wnd = XCreateWindow(display, RootWindowOfScreen(screen), xpos,          wnd = XCreateWindow(display, RootWindowOfScreen(screen), xpos,
280                                  ypos, width, height, 0, CopyFromParent,                              ypos, width, height, 0, CopyFromParent,
281                                  InputOutput, CopyFromParent, valuemask, &attribs);                              InputOutput, CopyFromParent, valuemask, &attribs);
282    
283    
284          XStoreName(display, wnd, title);          XStoreName(display, wnd, title);
# Line 311  ui_create_window_obj(int xpos, int ypos, Line 311  ui_create_window_obj(int xpos, int ypos,
311          XMapWindow(display, wnd);          XMapWindow(display, wnd);
312    
313          /* Wait for VisibilityNotify Event */          /* Wait for VisibilityNotify Event */
314          for (;;) {          for (;;)
315            {
316                  XNextEvent(display, &xevent);                  XNextEvent(display, &xevent);
317                  if (xevent.type == VisibilityNotify)                  if (xevent.type == VisibilityNotify)
318                          break;                          break;
# Line 397  ui_create_window() Line 398  ui_create_window()
398    
399    
400          input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |          input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
401                          VisibilityChangeMask | FocusChangeMask;                  VisibilityChangeMask | FocusChangeMask;
402    
403          if (grab_keyboard)          if (grab_keyboard)
404                  input_mask |= EnterWindowMask | LeaveWindowMask;                  input_mask |= EnterWindowMask | LeaveWindowMask;
# Line 408  ui_create_window() Line 409  ui_create_window()
409                  input_mask |= ExposureMask;                  input_mask |= ExposureMask;
410    
411          if (fullscreen)          if (fullscreen)
412                  ui_create_window_obj(0, 0, width, height, CWBackingStore | CWBackPixel | CWOverrideRedirect);                  ui_create_window_obj(0, 0, width, height,
413                                         CWBackingStore | CWBackPixel | CWOverrideRedirect);
414          else          else
415                  ui_create_window_obj(0, 0, width, height, CWBackingStore | CWBackPixel);                  ui_create_window_obj(0, 0, width, height, CWBackingStore | CWBackPixel);
416    
# Line 462  toggle_fullscreen() Line 464  toggle_fullscreen()
464                  XFreePixmap(display, backstore);                  XFreePixmap(display, backstore);
465          XFreeGC(display, gc);          XFreeGC(display, gc);
466          XDestroyWindow(display, wnd);          XDestroyWindow(display, wnd);
467          if (fullscreen) {          if (fullscreen)
468            {
469                  attribs.override_redirect = True;                  attribs.override_redirect = True;
470                  ui_create_window_obj(0, 0, dpy_width, dpy_height,                  ui_create_window_obj(0, 0, dpy_width, dpy_height,
471                                                                          CWBackingStore | CWBackPixel | CWOverrideRedirect);                                       CWBackingStore | CWBackPixel | CWOverrideRedirect);
472          }          }
473          else {          else
474            {
475                  attribs.override_redirect = False;                  attribs.override_redirect = False;
476                  ui_create_window_obj(0, 0, width, height,                  ui_create_window_obj(0, 0, width, height, CWBackingStore | CWBackPixel);
                                                                         CWBackingStore | CWBackPixel);  
477          }          }
478          ui_set_cursor(cache_get_cursor(0));          ui_set_cursor(cache_get_cursor(0));
479          ui_move_pointer(width / 2, height / 2);          ui_move_pointer(width / 2, height / 2);
# Line 540  xwin_process_events() Line 543  xwin_process_events()
543                                  }                                  }
544    
545                                  /* FIXME needs alt modifier */                                  /* FIXME needs alt modifier */
546                                  if (keysym == XK_Break) /* toggle full screen */                                  if (keysym == XK_Break) /* toggle full screen */
547                                  {                                  {
548                                          toggle_fullscreen();                                          toggle_fullscreen();
549                                          break;                                          break;

Legend:
Removed from v.100  
changed lines
  Added in v.101

  ViewVC Help
Powered by ViewVC 1.1.26