/[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 517 by matthewc, Tue Oct 28 03:30:51 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 797  ui_deinit(void) Line 802  ui_deinit(void)
802          g_display = NULL;          g_display = NULL;
803  }  }
804    
805    #define NULL_POINTER_MASK       "\x80"
806    #define NULL_POINTER_DATA       "\x0\x0\x0"
807            
808  BOOL  BOOL
809  ui_create_window(void)  ui_create_window(void)
810  {  {
# Line 881  ui_create_window(void) Line 889  ui_create_window(void)
889          g_kill_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True);          g_kill_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True);
890          XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1);          XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1);
891    
892            /* create invisible 1x1 cursor to be used as null cursor */
893            g_null_cursor = ui_create_cursor(0, 0, 1, 1, NULL_POINTER_MASK, NULL_POINTER_DATA);
894    
895          return True;          return True;
896  }  }
897    
898  void  void
899  ui_destroy_window(void)  ui_destroy_window(void)
900  {  {
901            ui_destroy_cursor(g_null_cursor);
902            
903          if (g_IC != NULL)          if (g_IC != NULL)
904                  XDestroyIC(g_IC);                  XDestroyIC(g_IC);
905    
# Line 1402  ui_destroy_cursor(HCURSOR cursor) Line 1415  ui_destroy_cursor(HCURSOR cursor)
1415          XFreeCursor(g_display, (Cursor) cursor);          XFreeCursor(g_display, (Cursor) cursor);
1416  }  }
1417    
1418    void
1419    ui_set_null_cursor(void)
1420    {
1421            ui_set_cursor(g_null_cursor);
1422    }
1423    
1424  #define MAKE_XCOLOR(xc,c) \  #define MAKE_XCOLOR(xc,c) \
1425                  (xc)->red   = ((c)->red   << 8) | (c)->red; \                  (xc)->red   = ((c)->red   << 8) | (c)->red; \
1426                  (xc)->green = ((c)->green << 8) | (c)->green; \                  (xc)->green = ((c)->green << 8) | (c)->green; \

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

  ViewVC Help
Powered by ViewVC 1.1.26