/[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 501 by stargo, Fri Oct 17 08:23:47 2003 UTC revision 508 by astrand, Wed Oct 22 10:55:11 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 797  ui_deinit(void) Line 798  ui_deinit(void)
798          g_display = NULL;          g_display = NULL;
799  }  }
800    
801    #define NULL_POINTER_MASK       "\x80"
802    #define NULL_POINTER_DATA       "\x0\x0\x0"
803            
804  BOOL  BOOL
805  ui_create_window(void)  ui_create_window(void)
806  {  {
# Line 881  ui_create_window(void) Line 885  ui_create_window(void)
885          g_kill_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True);          g_kill_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True);
886          XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1);          XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1);
887    
888            /* create invisible 1x1 cursor to be used as null cursor */
889            g_null_cursor = ui_create_cursor(0, 0, 1, 1, NULL_POINTER_MASK, NULL_POINTER_DATA);
890    
891          return True;          return True;
892  }  }
893    
894  void  void
895  ui_destroy_window(void)  ui_destroy_window(void)
896  {  {
897            ui_destroy_cursor(g_null_cursor);
898            
899          if (g_IC != NULL)          if (g_IC != NULL)
900                  XDestroyIC(g_IC);                  XDestroyIC(g_IC);
901    
# Line 1204  ui_select(int rdp_socket) Line 1213  ui_select(int rdp_socket)
1213    
1214  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
1215                  /* FIXME: there should be an API for registering fds */                  /* FIXME: there should be an API for registering fds */
1216                  if (g_rdpsnd && g_dsp_busy)                  if (g_dsp_busy)
1217                  {                  {
1218                          FD_SET(g_dsp_fd, &wfds);                          FD_SET(g_dsp_fd, &wfds);
1219                          n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n;                          n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n;
# Line 1224  ui_select(int rdp_socket) Line 1233  ui_select(int rdp_socket)
1233                          return 1;                          return 1;
1234    
1235  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
1236                  if (g_rdpsnd && g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds))                  if (g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds))
1237                          wave_out_play();                          wave_out_play();
1238  #endif  #endif
1239          }          }
# Line 1402  ui_destroy_cursor(HCURSOR cursor) Line 1411  ui_destroy_cursor(HCURSOR cursor)
1411          XFreeCursor(g_display, (Cursor) cursor);          XFreeCursor(g_display, (Cursor) cursor);
1412  }  }
1413    
1414    void
1415    ui_set_null_cursor(void)
1416    {
1417            ui_set_cursor(g_null_cursor);
1418    }
1419    
1420  #define MAKE_XCOLOR(xc,c) \  #define MAKE_XCOLOR(xc,c) \
1421                  (xc)->red   = ((c)->red   << 8) | (c)->red; \                  (xc)->red   = ((c)->red   << 8) | (c)->red; \
1422                  (xc)->green = ((c)->green << 8) | (c)->green; \                  (xc)->green = ((c)->green << 8) | (c)->green; \

Legend:
Removed from v.501  
changed lines
  Added in v.508

  ViewVC Help
Powered by ViewVC 1.1.26