Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

dmxprop.c File Reference

#include "dmx.h"
#include "dmxprop.h"
#include "dmxlog.h"

Defines

#define DMX_ATOMNAME   "DMX_NAME"
#define DMX_IDENT   "Xdmx"

Functions

void * dmxPropertyIterate (DMXScreenInfo *start, void *(*f)(DMXScreenInfo *dmxScreen, void *), void *closure)
int dmxPropertyDisplay (DMXScreenInfo *dmxScreen)
int dmxPropertySameDisplay (DMXScreenInfo *dmxScreen, const char *name)
void dmxPropertyWindow (DMXScreenInfo *dmxScreen)

Detailed Description

It is possible for one of the DMX "backend displays" to actually be smaller than the dimensions of the backend X server. Therefore, it is possible for more than one of the DMX "backend displays" to be physically located on the same backend X server. This situation must be detected so that cursor motion can be handled in an expected fashion.

We could analyze the names used for the DMX "backend displays" (e.g., the names passed to the -display command-line parameter), but there are many possible names for a single X display, and failing to detect sameness leads to very unexpected results. Therefore, whenever the DMX server opens a window on a backend X server, a property value is queried and set on that backend to detect when another window is already open on that server.

Further, it is possible that two different DMX server instantiations both have windows on the same physical backend X server. This case is also detected so that pointer input is not taken from that particular backend X server.

The routines in this file handle the property management.


Define Documentation

#define DMX_ATOMNAME   "DMX_NAME"
 

Holds the window id of all DMX windows on the backend X server.

#define DMX_IDENT   "Xdmx"
 

The identification string of this DMX server


Function Documentation

int dmxPropertyDisplay DMXScreenInfo dmxScreen  ) 
 

Returns 0 if this is the only Xdmx session on the display; 1 otherwise.

void* dmxPropertyIterate DMXScreenInfo start,
void *(*  f)(DMXScreenInfo *dmxScreen, void *),
void *  closure
 

Starting with the start screen, iterate over all of the screens on the same physical X server as start, calling f with the screen and the closure. (The common case is that start is the only DMX window on the backend X server.)

int dmxPropertySameDisplay DMXScreenInfo dmxScreen,
const char *  name
 

Returns 1 if the dmxScreen and the display in name are on the same display, or 0 otherwise. We can't just compare the display names because there can be multiple synonyms for the same display, some of which cannot be determined without accessing the display itself (e.g., domain aliases or machines with multiple NICs).

void dmxPropertyWindow DMXScreenInfo dmxScreen  ) 
 

Prints a log message if dmxScreen is on the same backend X server as some other DMX backend (output) screen. Modifies the property (DMX_ATOMNAME) on the backend X server to reflect the creation of dmxScreen.

The root window of the backend X server holds a list of window ids for all DMX windows (on this DMX server or some other DMX server).

This list can then be iterated, and the property for each window can be examined. This property contains the following tuple (no quotes):

"#DMX_IDENT:<hostname running DMX>:<display name of DMX>,<screen number>"


Generated June 13, 2004 for Distributed Multihead X by doxygen 1.3.4.