blob: ebc07371d2736a6533b164d2134d624f380a4666 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$FreeBSD$
--- src/lib/xnee.c.orig Sun Feb 9 21:17:05 2003
+++ src/lib/xnee.c Sun Feb 9 21:18:44 2003
@@ -501,7 +501,11 @@
int ret;
int window;
int screen;
-
+
+ if (xd->grab==NULL)
+ {
+ xd->grab = XOpenDisplay (NULL);
+ }
screen = DefaultScreen (xd->grab);
window = RootWindow(xd->grab, screen );
xnee_verbose (xd, "window %d\n", window);
@@ -696,7 +700,7 @@
xnee_new_xnee_data()
{
- xnee_data* xd = (xnee_data*) malloc (sizeof (xnee_data));
+ xnee_data* xd = (xnee_data*) calloc (1, sizeof (xnee_data));
if (xd==NULL)
{
xnee_print_error ("Could not allocate memory ........\n");
|