/[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 504 by stargo, Sun Oct 19 11:59:41 2003 UTC revision 519 by matthewc, Tue Oct 28 03:40:26 2003 UTC
# Line 49  static XIM g_IM; Line 49  static XIM g_IM;
49  static XIC g_IC;  static XIC g_IC;
50  static XModifierKeymap *g_mod_map;  static XModifierKeymap *g_mod_map;
51  static Cursor g_current_cursor;  static Cursor g_current_cursor;
52    static HCURSOR g_null_cursor;
53  static Atom g_protocol_atom, g_kill_atom;  static Atom g_protocol_atom, g_kill_atom;
54  static BOOL g_focused;  static BOOL g_focused;
55  static BOOL g_mouse_in_wnd;  static BOOL g_mouse_in_wnd;
# Line 704  ui_init(void) Line 705  ui_init(void)
705                  return False;                  return False;
706          }          }
707    
708          if (g_owncolmap != True)          /* private colour map code only works for 8 bpp */
709            if (g_owncolmap && (g_bpp > 8))
710                    g_owncolmap = False;
711    
712            if (!g_owncolmap)
713          {          {
714                  g_xcolmap = DefaultColormapOfScreen(g_screen);                  g_xcolmap = DefaultColormapOfScreen(g_screen);
715                  if (g_depth <= 8)                  if (g_depth <= 8)
# Line 775  ui_init(void) Line 780  ui_init(void)
780    
781          xclip_init();          xclip_init();
782    
783          /* todo take this out when high colour is done */          DEBUG_RDP5(("server bpp %d client bpp %d depth %d\n", g_server_bpp, g_bpp, g_depth));
         printf("server bpp %d client bpp %d depth %d\n", g_server_bpp, g_bpp, g_depth);  
784    
785          return True;          return True;
786  }  }
# Line 797  ui_deinit(void) Line 801  ui_deinit(void)
801          g_display = NULL;          g_display = NULL;
802  }  }
803    
804    #define NULL_POINTER_MASK       "\x80"
805    #define NULL_POINTER_DATA       "\x0\x0\x0"
806            
807  BOOL  BOOL
808  ui_create_window(void)  ui_create_window(void)
809  {  {
# Line 881  ui_create_window(void) Line 888  ui_create_window(void)
888          g_kill_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True);          g_kill_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True);
889          XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1);          XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1);
890    
891            /* create invisible 1x1 cursor to be used as null cursor */
892            g_null_cursor = ui_create_cursor(0, 0, 1, 1, NULL_POINTER_MASK, NULL_POINTER_DATA);
893    
894          return True;          return True;
895  }  }
896    
897  void  void
898  ui_destroy_window(void)  ui_destroy_window(void)
899  {  {
900            ui_destroy_cursor(g_null_cursor);
901            
902          if (g_IC != NULL)          if (g_IC != NULL)
903                  XDestroyIC(g_IC);                  XDestroyIC(g_IC);
904    
# Line 1402  ui_destroy_cursor(HCURSOR cursor) Line 1414  ui_destroy_cursor(HCURSOR cursor)
1414          XFreeCursor(g_display, (Cursor) cursor);          XFreeCursor(g_display, (Cursor) cursor);
1415  }  }
1416    
1417    void
1418    ui_set_null_cursor(void)
1419    {
1420            ui_set_cursor(g_null_cursor);
1421    }
1422    
1423  #define MAKE_XCOLOR(xc,c) \  #define MAKE_XCOLOR(xc,c) \
1424                  (xc)->red   = ((c)->red   << 8) | (c)->red; \                  (xc)->red   = ((c)->red   << 8) | (c)->red; \
1425                  (xc)->green = ((c)->green << 8) | (c)->green; \                  (xc)->green = ((c)->green << 8) | (c)->green; \

Legend:
Removed from v.504  
changed lines
  Added in v.519

  ViewVC Help
Powered by ViewVC 1.1.26