projects
/
dana
/
dcompmgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no globals
[dana/dcompmgr.git]
/
dcompmgr.c
diff --git
a/dcompmgr.c
b/dcompmgr.c
index
9008a16
..
12a711b
100644
(file)
--- a/
dcompmgr.c
+++ b/
dcompmgr.c
@@
-6,10
+6,8
@@
#include <string.h>
#include <xcb/xcb.h>
#include <string.h>
#include <xcb/xcb.h>
-static d_screen_t *screens = NULL;
-
static gint
static gint
-all_screens(xcb_connection_t *conn)
+all_screens(xcb_connection_t *conn
, d_screen_t **list
)
{
static const xcb_setup_t *setup;
xcb_screen_iterator_t it;
{
static const xcb_setup_t *setup;
xcb_screen_iterator_t it;
@@
-24,8
+22,8
@@
all_screens(xcb_connection_t *conn)
sc.num = i++;
if (screen_register(conn, &sc)) {
++count;
sc.num = i++;
if (screen_register(conn, &sc)) {
++count;
-
screens = g_renew(d_screen_t, screens
, count);
-
screens
[count-1] = sc;
+
*list = g_renew(d_screen_t, *list
, count);
+
(*list)
[count-1] = sc;
printf(_("managing screen %d\n"), sc.num);
}
}
printf(_("managing screen %d\n"), sc.num);
}
}
@@
-36,6
+34,7
@@
int
main(int argc, char **argv)
{
xcb_connection_t *conn;
main(int argc, char **argv)
{
xcb_connection_t *conn;
+ d_screen_t *screens = NULL;
conn = xcb_connect(NULL, NULL);
if (!conn) {
conn = xcb_connect(NULL, NULL);
if (!conn) {
@@
-43,7
+42,7
@@
main(int argc, char **argv)
return 1;
}
return 1;
}
- all_screens(conn);
+ all_screens(conn
, &screens
);
xcb_disconnect(conn);
xcb_disconnect(conn);