/[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 473 by jsorg71, Thu Sep 25 22:23:42 2003 UTC revision 474 by matthewc, Tue Sep 30 09:11:08 2003 UTC
# Line 66  static BOOL g_moving_wnd; Line 66  static BOOL g_moving_wnd;
66  static int g_move_x_offset = 0;  static int g_move_x_offset = 0;
67  static int g_move_y_offset = 0;  static int g_move_y_offset = 0;
68    
69    #ifdef WITH_RDPSND
70    extern int g_dsp_fd;
71    extern BOOL g_dsp_busy;
72    #endif
73    
74  /* MWM decorations */  /* MWM decorations */
75  #define MWM_HINTS_DECORATIONS   (1L << 1)  #define MWM_HINTS_DECORATIONS   (1L << 1)
76  #define PROP_MOTIF_WM_HINTS_ELEMENTS    5  #define PROP_MOTIF_WM_HINTS_ELEMENTS    5
# Line 1078  int Line 1083  int
1083  ui_select(int rdp_socket)  ui_select(int rdp_socket)
1084  {  {
1085          int n = (rdp_socket > g_x_socket) ? rdp_socket + 1 : g_x_socket + 1;          int n = (rdp_socket > g_x_socket) ? rdp_socket + 1 : g_x_socket + 1;
1086          fd_set rfds;          fd_set rfds, wfds;
1087    
1088          FD_ZERO(&rfds);          FD_ZERO(&rfds);
1089    
# Line 1090  ui_select(int rdp_socket) Line 1095  ui_select(int rdp_socket)
1095                          return 0;                          return 0;
1096    
1097                  FD_ZERO(&rfds);                  FD_ZERO(&rfds);
1098                    FD_ZERO(&wfds);
1099                  FD_SET(rdp_socket, &rfds);                  FD_SET(rdp_socket, &rfds);
1100                  FD_SET(g_x_socket, &rfds);                  FD_SET(g_x_socket, &rfds);
1101    
1102                  switch (select(n, &rfds, NULL, NULL, NULL))  #ifdef WITH_RDPSND
1103                    /* FIXME: there should be an API for registering fds */
1104                    if (g_dsp_busy)
1105                    {
1106                            FD_SET(g_dsp_fd, &wfds);
1107                            n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n;
1108                    }
1109    #endif
1110    
1111                    switch (select(n, &rfds, &wfds, NULL, NULL))
1112                  {                  {
1113                          case -1:                          case -1:
1114                                  error("select: %s\n", strerror(errno));                                  error("select: %s\n", strerror(errno));
# Line 1104  ui_select(int rdp_socket) Line 1119  ui_select(int rdp_socket)
1119    
1120                  if (FD_ISSET(rdp_socket, &rfds))                  if (FD_ISSET(rdp_socket, &rfds))
1121                          return 1;                          return 1;
1122    
1123    #ifdef WITH_RDPSND
1124                    if (FD_ISSET(g_dsp_fd, &wfds))
1125                            wave_out_play();
1126    #endif
1127          }          }
1128  }  }
1129    

Legend:
Removed from v.473  
changed lines
  Added in v.474

  ViewVC Help
Powered by ViewVC 1.1.26