20 |
|
|
21 |
#include <X11/Xlib.h> |
#include <X11/Xlib.h> |
22 |
#include <X11/Xutil.h> |
#include <X11/Xutil.h> |
23 |
|
#include <unistd.h> |
24 |
#include <time.h> |
#include <time.h> |
25 |
#include <errno.h> |
#include <errno.h> |
26 |
#include "rdesktop.h" |
#include "rdesktop.h" |
850 |
g_display = NULL; |
g_display = NULL; |
851 |
} |
} |
852 |
|
|
|
#define NULL_POINTER_MASK "\x80" |
|
|
#define NULL_POINTER_DATA "\x0\x0\x0" |
|
|
|
|
853 |
BOOL |
BOOL |
854 |
ui_create_window(void) |
ui_create_window(void) |
855 |
{ |
{ |
856 |
|
uint8 null_pointer_mask[1] = { 0x80 }; |
857 |
|
uint8 null_pointer_data[4] = { 0x00, 0x00, 0x00, 0x00 }; |
858 |
XSetWindowAttributes attribs; |
XSetWindowAttributes attribs; |
859 |
XClassHint *classhints; |
XClassHint *classhints; |
860 |
XSizeHints *sizehints; |
XSizeHints *sizehints; |
937 |
XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1); |
XSetWMProtocols(g_display, g_wnd, &g_kill_atom, 1); |
938 |
|
|
939 |
/* create invisible 1x1 cursor to be used as null cursor */ |
/* create invisible 1x1 cursor to be used as null cursor */ |
940 |
g_null_cursor = ui_create_cursor(0, 0, 1, 1, NULL_POINTER_MASK, NULL_POINTER_DATA); |
g_null_cursor = ui_create_cursor(0, 0, 1, 1, null_pointer_mask, null_pointer_data); |
941 |
|
|
942 |
return True; |
return True; |
943 |
} |
} |
945 |
void |
void |
946 |
ui_destroy_window(void) |
ui_destroy_window(void) |
947 |
{ |
{ |
|
ui_destroy_cursor(g_null_cursor); |
|
|
|
|
948 |
if (g_IC != NULL) |
if (g_IC != NULL) |
949 |
XDestroyIC(g_IC); |
XDestroyIC(g_IC); |
950 |
|
|