CTWM
Loading...
Searching...
No Matches
Functions | Variables
/usr/src/RPM/BUILD/ctwm-4.1.0/ctwm_takeover.c File Reference
#include "ctwm.h"
#include <stdio.h>
#include <X11/Xproto.h>
#include <X11/Xmu/Error.h>
#include "ctwm_takeover.h"
#include "screen.h"
Include dependency graph for ctwm_takeover.c:

Go to the source code of this file.

Functions

static int CatchRedirectError (Display *display, XErrorEvent *event)
 Temporary error handler used during startup.
 
static int TwmErrorHandler (Display *display, XErrorEvent *event)
 Error handler used in normal operation.
 
bool takeover_screen (ScreenInfo *scr)
 Take over as WM for a screen.
 

Variables

static bool RedirectError
 Flag for "we got an error trying to take over".
 

Function Documentation

◆ CatchRedirectError()

static int CatchRedirectError ( Display * display,
XErrorEvent * event )
static

Temporary error handler used during startup.

We expect an error if we fail to take over some of the XSelectInput() events we're trying to (which only 1 thing at a time is allowed to). Probably that would be a BadAccess error type? But really, any error means we're in trouble and should skip over the display, so we don't check any more deeply...

Definition at line 112 of file ctwm_takeover.c.

References RedirectError.

Referenced by takeover_screen().

◆ takeover_screen()

bool takeover_screen ( ScreenInfo * scr)

◆ TwmErrorHandler()

static int TwmErrorHandler ( Display * display,
XErrorEvent * event )
static

Error handler used in normal operation.

Or, perhaps, error ignorer used in normal operation. If run with -v, we'll print out a lot of the errors we might get, though we always skip several.

Definition at line 126 of file ctwm_takeover.c.

References CLarg, PlaceX, and _ctwm_cl_args::PrintErrorMessages.

Referenced by takeover_screen().

Variable Documentation

◆ RedirectError

bool RedirectError
static

Flag for "we got an error trying to take over".

Set in temporary error handler.

Definition at line 17 of file ctwm_takeover.c.

Referenced by CatchRedirectError(), and takeover_screen().