23 |
#include <unistd.h> |
#include <unistd.h> |
24 |
#include <time.h> |
#include <time.h> |
25 |
#include <errno.h> |
#include <errno.h> |
26 |
|
#include <strings.h> |
27 |
#include "rdesktop.h" |
#include "rdesktop.h" |
28 |
#include "xproto.h" |
#include "xproto.h" |
29 |
|
|
64 |
|
|
65 |
/* software backing store */ |
/* software backing store */ |
66 |
static BOOL g_ownbackstore; |
static BOOL g_ownbackstore; |
67 |
static Pixmap g_backstore = NULL; |
static Pixmap g_backstore = 0; |
68 |
|
|
69 |
/* Moving in single app mode */ |
/* Moving in single app mode */ |
70 |
static BOOL g_moving_wnd; |
static BOOL g_moving_wnd; |
895 |
if (g_gc == NULL) |
if (g_gc == NULL) |
896 |
g_gc = XCreateGC(g_display, g_wnd, 0, NULL); |
g_gc = XCreateGC(g_display, g_wnd, 0, NULL); |
897 |
|
|
898 |
if ((g_ownbackstore) && (g_backstore == NULL)) |
if ((g_ownbackstore) && (g_backstore == 0)) |
899 |
{ |
{ |
900 |
g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth); |
g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth); |
901 |
|
|
1272 |
int |
int |
1273 |
ui_select(int rdp_socket) |
ui_select(int rdp_socket) |
1274 |
{ |
{ |
1275 |
int n = (rdp_socket > g_x_socket) ? rdp_socket : g_x_socket; |
int n; |
1276 |
fd_set rfds, wfds; |
fd_set rfds, wfds; |
1277 |
struct timeval tv; |
struct timeval tv; |
1278 |
BOOL s_timeout = False; |
BOOL s_timeout = False; |
1279 |
|
|
1280 |
while (True) |
while (True) |
1281 |
{ |
{ |
1282 |
|
n = (rdp_socket > g_x_socket) ? rdp_socket : g_x_socket; |
1283 |
/* Process any events already waiting */ |
/* Process any events already waiting */ |
1284 |
if (!xwin_process_events()) |
if (!xwin_process_events()) |
1285 |
/* User quit */ |
/* User quit */ |
1313 |
error("select: %s\n", strerror(errno)); |
error("select: %s\n", strerror(errno)); |
1314 |
|
|
1315 |
case 0: |
case 0: |
1316 |
s_timeout = True; |
/* TODO: if tv.tv_sec just times out |
1317 |
rdpdr_check_fds(&rfds, &wfds, (BOOL) True); |
* we will segfault. |
1318 |
|
* FIXME: |
1319 |
|
*/ |
1320 |
|
//s_timeout = True; |
1321 |
|
//rdpdr_check_fds(&rfds, &wfds, (BOOL) True); |
1322 |
continue; |
continue; |
1323 |
} |
} |
1324 |
|
|