30 |
|
|
31 |
extern int g_width; |
extern int g_width; |
32 |
extern int g_height; |
extern int g_height; |
33 |
|
extern int g_xpos; |
34 |
|
extern int g_ypos; |
35 |
extern BOOL g_sendmotion; |
extern BOOL g_sendmotion; |
36 |
extern BOOL g_fullscreen; |
extern BOOL g_fullscreen; |
37 |
extern BOOL g_grab_keyboard; |
extern BOOL g_grab_keyboard; |
948 |
ui_create_window(void) |
ui_create_window(void) |
949 |
{ |
{ |
950 |
uint8 null_pointer_mask[1] = { 0x80 }; |
uint8 null_pointer_mask[1] = { 0x80 }; |
951 |
uint8 null_pointer_data[4] = { 0x00, 0x00, 0x00, 0x00 }; |
uint8 null_pointer_data[24] = { 0x00 }; |
952 |
|
|
953 |
XSetWindowAttributes attribs; |
XSetWindowAttributes attribs; |
954 |
XClassHint *classhints; |
XClassHint *classhints; |
955 |
XSizeHints *sizehints; |
XSizeHints *sizehints; |
966 |
attribs.override_redirect = g_fullscreen; |
attribs.override_redirect = g_fullscreen; |
967 |
attribs.colormap = g_xcolmap; |
attribs.colormap = g_xcolmap; |
968 |
|
|
969 |
g_wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), 0, 0, wndwidth, wndheight, |
g_wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), g_xpos, g_ypos, wndwidth, wndheight, |
970 |
0, g_depth, InputOutput, g_visual, |
0, g_depth, InputOutput, g_visual, |
971 |
CWBackPixel | CWBackingStore | CWOverrideRedirect | |
CWBackPixel | CWBackingStore | CWOverrideRedirect | |
972 |
CWColormap | CWBorderPixel, &attribs); |
CWColormap | CWBorderPixel, &attribs); |
1437 |
error("select: %s\n", strerror(errno)); |
error("select: %s\n", strerror(errno)); |
1438 |
|
|
1439 |
case 0: |
case 0: |
1440 |
/* TODO: if tv.tv_sec just times out |
/* Abort serial read calls */ |
1441 |
* we will segfault. |
if (s_timeout) |
1442 |
* FIXME: |
rdpdr_check_fds(&rfds, &wfds, (BOOL) True); |
|
*/ |
|
|
//s_timeout = True; |
|
|
//rdpdr_check_fds(&rfds, &wfds, (BOOL) True); |
|
1443 |
continue; |
continue; |
1444 |
} |
} |
1445 |
|
|
1446 |
rdpdr_check_fds(&rfds, &wfds, (BOOL) False); |
rdpdr_check_fds(&rfds, &wfds, (BOOL) False); |
1447 |
|
|
1448 |
|
if (FD_ISSET(rdp_socket, &rfds)) |
1449 |
|
return 1; |
1450 |
|
|
1451 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
1452 |
if (g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds)) |
if (g_dsp_busy && FD_ISSET(g_dsp_fd, &wfds)) |
1453 |
wave_out_play(); |
wave_out_play(); |
1454 |
#endif |
#endif |
|
|
|
|
if (FD_ISSET(rdp_socket, &rfds)) |
|
|
return 1; |
|
1455 |
} |
} |
1456 |
} |
} |
1457 |
|
|