Back to index

im-sdk  12.3.91
Classes | Defines | Typedefs | Functions | Variables
Xfactory.cpp File Reference
#include "Xfactory.hh"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.


struct  _PropWMState




typedef struct _PropWMState PropWMState


void _XRegisterFilterByType (Display *, Window, int, int, XIMFilter, XPointer)
void _XUnregisterFilter (Display *, Window, XIMFilter, XPointer)
static void getAtoms (Display *display)
static Bool GetWMState (Display *display, Window window)


static Atom mwm_del_atom = (Atom)0
static Atom ol_del_atom = (Atom)0
static Atom ol_del_atom_list [3]
static int ol_atom_inx = 0

Class Documentation

struct _PropWMState

Definition at line 284 of file Xfactory.cpp.

Class Members
unsigned long ion
unsigned long state

Define Documentation


Definition at line 282 of file Xfactory.cpp.

Typedef Documentation

typedef struct _PropWMState PropWMState

Function Documentation

void _XRegisterFilterByType ( Display *  ,
Window  ,
int  ,
int  ,
XIMFilter  ,
void _XUnregisterFilter ( Display *  ,
Window  ,
XIMFilter  ,
static void getAtoms ( Display *  display) [static]

Definition at line 65 of file Xfactory.cpp.

  if (!mwm_del_atom) {
    mwm_del_atom = XInternAtom(display, "_MOTIF_WM_HINTS", True);
  if (!ol_del_atom) {
    ol_del_atom = XInternAtom(display, "_OL_DECOR_DEL", True);
    ol_del_atom_list[ol_atom_inx++] =
      XInternAtom(display, "_OL_DECOR_RESIZE", True);
    ol_del_atom_list[ol_atom_inx++] =
      XInternAtom(display, "_OL_DECOR_HEADER", True);

Here is the caller graph for this function:

static Bool GetWMState ( Display *  display,
Window  window 
) [static]

Definition at line 290 of file Xfactory.cpp.

  int ret_val;
  PropWMState *property = NULL;
  Atom actual_type;
  int actual_format;
  unsigned long nitems;
  unsigned long leftover;
  Atom wm_state = XInternAtom(display, "WM_STATE", True);

  ret_val = XGetWindowProperty(display, window, wm_state,
                            0L, PROP_WM_STATE_ELEMENTS,
                            False, wm_state,
                            &actual_type, &actual_format,
                            &nitems, &leftover,
                            (unsigned char **)&property);
  if (!((ret_val == Success) && (actual_type == wm_state) &&
       (nitems == PROP_WM_STATE_ELEMENTS))) {
     * The property could not be retrieved or is not correctly set up.
    if (property) {
    return False;
  if (property) {
  return True;

Here is the caller graph for this function:

Variable Documentation

Atom mwm_del_atom = (Atom)0 [static]

Definition at line 58 of file Xfactory.cpp.

int ol_atom_inx = 0 [static]

Definition at line 63 of file Xfactory.cpp.

Atom ol_del_atom = (Atom)0 [static]

Definition at line 61 of file Xfactory.cpp.

Atom ol_del_atom_list[3] [static]

Definition at line 62 of file Xfactory.cpp.