]>
Dogcows Code - chaz/openbox/blob - obt/instance.c
19 ObtInstance
* obt_instance_new(const char *display_name
)
23 ObtInstance
*inst
= NULL
;
25 n
= display_name
? g_strdup(display_name
) : NULL
;
28 if (fcntl(ConnectionNumber(d
), F_SETFD
, 1) == -1)
29 g_message("Failed to set display as close-on-exec");
31 inst
= g_new(ObtInstance
, 1);
40 void obt_instance_ref(ObtInstance
*inst
)
45 void obt_instance_unref(ObtInstance
*inst
)
47 if (inst
&& --inst
->ref
== 0) {
48 XCloseDisplay(inst
->d
);
49 obt_free0(inst
, ObtInstance
, 1);
53 Display
* obt_display(const ObtInstance
*inst
)
This page took 0.036884 seconds and 5 git commands to generate.