Main Page | Class List | File List | Class Members | File Members | Related Pages

Manager Class Reference

#include <manager.h>

Collaboration diagram for Manager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Manager (int, char **)
 ~Manager ()
void quitNicely ()
void restart ()
StrutgetMasterStrut ()
void setExtendedWMHint (Window, int, long)

Public Attributes

Toolbar * toolBar
Display * dpy
Window rootWin
QRect desktopRect
std::map< Window, Handler * > Clients
Atom atomUtf8String
Atom atomWmState
Atom atomWmChangeState
Atom atomWmProtos
Atom atomWmDelete
Atom atomWmCmapwins
Atom atomWmTakefocus
Atom atomNetSupported
Atom atomNetClientList
Atom atomNetClientListStacking
Atom atomNetNumberOfDesktops
Atom atomNetDesktopGeometry
Atom atomNetDesktopViewport
Atom atomNetCurrentDesktop
Atom atomNetActiveWindow
Atom atomNetWorkarea
Atom atomNetSupportingWmCheck
Atom atomNetCloseWindow
Atom atomNetWmName
Atom atomNetWmDesktop
Atom atomNetWmState
Atom atomNetWmStateModal
Atom atomNetWmStateSticky
Atom atomNetWmStateMaximizedVert
Atom atomNetWmStateMaximizedHorz
Atom atomNetWmStateShaded
Atom atomNetWmStateSkipTaskbar
Atom atomNetWmStateSkipPager
Atom atomNetWmStrut

Protected Member Functions

bool x11EventFilter (XEvent *)

Private Member Functions

void setupSignalHandlers ()
void setupDisplay ()
void scanWindows ()
void setExtendedWMHintString (Window, int, char *)
void setExtendedNetSupported ()
void setExtendedNetDesktopGeometry ()
void setExtendedNetDesktopViewport ()
bool handleKeyPressEvent (XEvent *)
bool handleButtonPressEvent (XEvent *)
bool handleButtonReleaseEvent (XEvent *)
bool handleConfigureRequestEvent (XEvent *)
bool handleMotionNotifyEvent (XEvent *)
bool handleMapRequestEvent (XEvent *)
bool handleUnmapNotifyEvent (XEvent *)
bool handleDestroyNotifyEvent (XEvent *)
bool handleEnterNotifyEvent (XEvent *)
bool handleLeaveNotifyEvent (XEvent *)
bool handleFocusInEvent (XEvent *)
bool handleFocusOutEvent (XEvent *)
bool handleClientMessageEvent (XEvent *)
bool handleColormapNotifyEvent (XEvent *)
bool handlePropertyNotifyEvent (XEvent *)
bool handleExposeEvent (XEvent *)
bool handleDefaultEvent (XEvent *)

Private Attributes

Window grabWindow
Window extendedHintsWin
HandlerfocusClient
Cursor rCursor
int maxDesktops
int currentDesktop
StrutmasterStrut

Detailed Description

This class contains the main X event loop, as supplied by Qt. The events are either used by member functions or are dispatched to the corresponding Handler object.
Basic initialization takes place here as well.


Constructor & Destructor Documentation

Manager::Manager int  argc,
char **  argv
 

The arguments argc and argv are not used here, but are passed on to QApplication.
This allows us to use them later, if and when we have a use for them.
Some arguments may be swallowed by Qt, though.

Here is the call graph for this function:

Manager::~Manager  ) 
 


Member Function Documentation

Strut* Manager::getMasterStrut  )  [inline]
 

bool Manager::handleButtonPressEvent XEvent *   )  [private]
 

bool Manager::handleButtonReleaseEvent XEvent *   )  [private]
 

bool Manager::handleClientMessageEvent XEvent *   )  [private]
 

bool Manager::handleColormapNotifyEvent XEvent *   )  [private]
 

bool Manager::handleConfigureRequestEvent XEvent *  ev  )  [private]
 

If the window already is a client, i.e. is found in the Client map, the handling of this event is done in the corresponding Handler object. Otherwise the request is delegated back to the window so it can use it.

In any case returns true.

bool Manager::handleDefaultEvent XEvent *   )  [private]
 

bool Manager::handleDestroyNotifyEvent XEvent *   )  [private]
 

bool Manager::handleEnterNotifyEvent XEvent *   )  [private]
 

bool Manager::handleExposeEvent XEvent *   )  [private]
 

bool Manager::handleFocusInEvent XEvent *   )  [private]
 

bool Manager::handleFocusOutEvent XEvent *   )  [private]
 

bool Manager::handleKeyPressEvent XEvent *   )  [private]
 

bool Manager::handleLeaveNotifyEvent XEvent *   )  [private]
 

bool Manager::handleMapRequestEvent XEvent *  ev  )  [private]
 

If the requesting window already is a client, the corresponding Handler object will handle it. Otherwise a new Handler object is created and added to the Client map.

Returns true in both cases.

Todo:
I am not really happy with this one, will have to be rechecked later.

bool Manager::handleMotionNotifyEvent XEvent *   )  [private]
 

bool Manager::handlePropertyNotifyEvent XEvent *  ev  )  [private]
 

If it is a known client as found in the Client map, the event is handled by the corresponding Handler object. In this case true will be returned.

Otherwise nothing is done and false is returned.

bool Manager::handleUnmapNotifyEvent XEvent *   )  [private]
 

void Manager::quitNicely  ) 
 

void Manager::restart  ) 
 

void Manager::scanWindows  )  [private]
 

Function to scan for existing windows at startup. Existing windows will be mapped as clients and will be shown if necessary.

void Manager::setExtendedNetDesktopGeometry  )  [private]
 

void Manager::setExtendedNetDesktopViewport  )  [private]
 

void Manager::setExtendedNetSupported  )  [private]
 

void Manager::setExtendedWMHint Window  ,
int  ,
long 
 

void Manager::setExtendedWMHintString Window  ,
int  ,
char * 
[private]
 

void Manager::setupDisplay  )  [private]
 

The name of this member is somehow misleading. It is really used to set up the basic members we need to manage windows. It also sets up a decent cursor - I think a window manager should do this: I for one don't like that ugly big fat X shaped default cursor.
This is the place where the atoms we will be using are set up.

Todo:
I don't like the way atoms are handled at all.

Here is the call graph for this function:

void Manager::setupSignalHandlers  )  [private]
 

Here is the call graph for this function:

bool Manager::x11EventFilter XEvent *  ev  )  [protected]
 

This is where the heart beats.

x11EventFilter is reimplemented from QApplication. It is merely a dispatcher to enable more specialized functions to take a closer look at every XEvent. It is a boolean function, to tell QApplication if we have eaten this event ourselfes or expect Qt to do something about it.

Returns true if we used it, false otherwise.

Here is the call graph for this function:


Member Data Documentation

Atom Manager::atomNetActiveWindow
 

Atom Manager::atomNetClientList
 

Atom Manager::atomNetClientListStacking
 

Atom Manager::atomNetCloseWindow
 

Atom Manager::atomNetCurrentDesktop
 

Atom Manager::atomNetDesktopGeometry
 

Atom Manager::atomNetDesktopViewport
 

Atom Manager::atomNetNumberOfDesktops
 

Atom Manager::atomNetSupported
 

Atom Manager::atomNetSupportingWmCheck
 

Atom Manager::atomNetWmDesktop
 

Atom Manager::atomNetWmName
 

Atom Manager::atomNetWmState
 

Atom Manager::atomNetWmStateMaximizedHorz
 

Atom Manager::atomNetWmStateMaximizedVert
 

Atom Manager::atomNetWmStateModal
 

Atom Manager::atomNetWmStateShaded
 

Atom Manager::atomNetWmStateSkipPager
 

Atom Manager::atomNetWmStateSkipTaskbar
 

Atom Manager::atomNetWmStateSticky
 

Atom Manager::atomNetWmStrut
 

Atom Manager::atomNetWorkarea
 

Atom Manager::atomUtf8String
 

Atom Manager::atomWmChangeState
 

Atom Manager::atomWmCmapwins
 

Atom Manager::atomWmDelete
 

Atom Manager::atomWmProtos
 

Atom Manager::atomWmState
 

Atom Manager::atomWmTakefocus
 

std::map<Window, Handler*> Manager::Clients
 

int Manager::currentDesktop [private]
 

QRect Manager::desktopRect
 

Display* Manager::dpy
 

Window Manager::extendedHintsWin [private]
 

Handler* Manager::focusClient [private]
 

Window Manager::grabWindow [private]
 

Strut* Manager::masterStrut [private]
 

int Manager::maxDesktops [private]
 

Cursor Manager::rCursor [private]
 

Window Manager::rootWin
 

Toolbar* Manager::toolBar
 


The documentation for this class was generated from the following files:
Go back to rwm - the window manager's - Home page.
created 13 Jun 2005 for rwm 0.2 by Rolf C. Rönnau using doxygen 1.4.2