neko/pkg/xevent/xevent.h
tt2468 00c7e6dfb2
Move X11 error handler registration to before screen sets (#62)
If X11 throws an error during screen config get/set, the default error
handler at the time will be one which causes a program exit. This
splits the error handler registration in xevent into its own call,
allowing us to register our error handler earlier on. This results in
the safe error handling logic actually being called instead of a full
program exit.
2024-03-27 21:38:33 +01:00

25 lines
904 B
C

#pragma once
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xfixes.h>
#include <stdlib.h>
#include <string.h>
extern void goXEventCursorChanged(XFixesCursorNotifyEvent event);
extern void goXEventClipboardUpdated();
extern void goXEventConfigureNotify(Display *display, Window window, char *name, char *role);
extern void goXEventUnmapNotify(Window window);
extern void goXEventWMChangeState(Display *display, Window window, ulong state);
extern void goXEventError(XErrorEvent *event, char *message);
extern int goXEventActive();
static int XEventError(Display *display, XErrorEvent *event);
void XSetupErrorHandler();
void XEventLoop(char *display);
static void XWindowManagerStateEvent(Display *display, Window window, ulong action, ulong first, ulong second);
void XFileChooserHide(Display *display, Window window);