35#include <X11/extensions/shape.h>
63#define MAX_X_EVENT 256
118#define STDH(evt) EventHandler[evt] = Handle##evt
132 STDH(ConfigureRequest);
134 STDH(PropertyNotify);
137 STDH(ColormapNotify);
138 STDH(VisibilityNotify);
139 STDH(CirculateNotify);
147 STDH(SelectionClear);
202 XtDispatchEvent(&
Event);
210 fprintf(stderr,
"Error: Should never reach the end of HandleEvents()\n");
222 struct timeval timeout, *tout = NULL;
225#define NEXTEVENT XtAppNextEvent(appContext, event)
230 if(XEventsQueued(display, QueuedAfterFlush) != 0) {
234 fd = ConnectionNumber(display);
258 found = select(fd + 1, &mask, NULL, NULL, tout);
268 if(FD_ISSET(fd, &mask)) {
307 Window w =
Event.xany.window;
322 if(
CLarg.is_captive) {
323 if((
Event.type == ConfigureNotify)
324 && (
Event.xconfigure.window ==
Scr->CaptiveRoot)) {
345 Window w =
Event.xany.window;
366 if(
Event.type == Expose) {
411 case SelectionRequest:
414 case SelectionNotify:
439 name =
"Unknown event";
443 fprintf(
tracefile,
"event: %s in window 0x%x\n", name,
444 (
unsigned int)e->xany.window);
448 fprintf(
tracefile,
" : +%d,+%d (+%d,+%d) state=%d, keycode=%d\n",
449 e->xkey.x, e->xkey.y,
450 e->xkey.x_root, e->xkey.y_root,
451 e->xkey.state, e->xkey.keycode);
455 fprintf(
tracefile,
" : +%d,+%d (+%d,+%d) state=%d, button=%d\n",
456 e->xbutton.x, e->xbutton.y,
457 e->xbutton.x_root, e->xbutton.y_root,
458 e->xbutton.state, e->xbutton.button);
struct timeval AnimateTimeout
void ConfigureCaptiveRootWindow(XEvent *ev)
bool InstallColormaps(int type, Colormaps *cmaps)
bool SignalFlag
Some signal flag has been set.
static void dumpevent(const XEvent *e)
static bool StashEventTime(XEvent *ev)
bool DispatchEvent2(void)
event_proc EventHandler[256]
static void CtwmNextEvent(Display *display, XEvent *event)
void HandleFocusChange(void)
void HandleShapeNotify(void)
ScreenInfo * GetTwmScreen(XEvent *event)
void AutoLowerWindow(TwmWindow *tmp)
const char * event_name_by_num(int evt)
void FixRootEvent(XEvent *e)
void AutoRaiseWindow(TwmWindow *tmp)
void handle_signal_flag(Time t)
Handle stuff set by a signal flag.
Info and control for each X Screen we control.
Info and control for every X Window we take over.
TwmWindow * GetTwmWindow(Window w)