started to reduce globals, set signal handlers after everything used in them initialized

This commit is contained in:
Mathias Panzenböck
2014-02-15 06:07:53 +01:00
parent 133d5b8547
commit 5fef530aa0
5 changed files with 27 additions and 18 deletions

View File

@ -1,10 +1,10 @@
#include "event.h"
//this should be initialized by main.cpp as soon as the program starts.
Display* display = 0;
Display *display = 0;
//actually creates an XWindows event :)
void sendevent( xevent e ) {
void sendevent( Display* display, xevent e ) {
if (e.value1 == 0 && e.value2 == 0) return;
if (e.type == WARP) {
XTestFakeRelativeMotionEvent(display, e.value1, e.value2, 0);