private void Initialize() { Name = "blis"; xeventsRunner = true; SelectInput(XEventMask.KeyPressMask | XEventMask.VisibilityChangeMask | XEventMask.KeyReleaseMask | XEventMask.ButtonPressMask | XEventMask.ButtonReleaseMask | XEventMask.EnterWindowMask | XEventMask.LeaveWindowMask | XEventMask.PointerMotionMask | XEventMask.Button1MotionMask | XEventMask.Button2MotionMask | XEventMask.Button3MotionMask | XEventMask.Button4MotionMask | XEventMask.Button5MotionMask | XEventMask.ButtonMotionMask | XEventMask.ExposureMask | XEventMask.StructureNotifyMask | XEventMask.FocusChangeMask | XEventMask.PropertyChangeMask | XEventMask.ColormapChangeMask //| XEventMask.PointerMotionHintMask //| XEventMask.KeymapStateMask //| XEventMask.SubstructureNotifyMask //| XEventMask.SubstructureRedirectMask //| XEventMask.ResizeRedirectMask ); Screen = new XScreen(Display); Pointer = new XPointer(Display); GC = new XGC(Display); xevents = new XEvent(Display); xevents.ShapeHandlerEvent += (xevent, window) => { if (ShapeHandlerEvent != null) { ShapeHandlerEvent(xevent, window); } }; xevents.KeyPressHandlerEvent += (xevent, window, root, subwindow) => { if (KeyPressHandlerEvent != null) { KeyPressHandlerEvent(xevent, window, root, subwindow); } }; xevents.KeyReleaseHandlerEvent += (xevent, window, root, subwindow) => { if (KeyReleaseHandlerEvent != null) { KeyReleaseHandlerEvent(xevent, window, root, subwindow); } }; xevents.ButtonPressHandlerEvent += (xevent, window, root, subwindow) => { if (ButtonPressHandlerEvent != null) { ButtonPressHandlerEvent(xevent, window, root, subwindow); } }; xevents.ButtonReleaseHandlerEvent += (xevent, window, root, subwindow) => { if (ButtonReleaseHandlerEvent != null) { ButtonReleaseHandlerEvent(xevent, window, root, subwindow); } }; xevents.ExposeHandlerEvent += (xevent, window) => { if (ExposeHandlerEvent != null) { ExposeHandlerEvent(xevent, window); } }; xevents.EnterNotifyHandlerEvent += (xevent, window, root, subwindow) => { if (EnterNotifyHandlerEvent != null) { EnterNotifyHandlerEvent(xevent, window, root, subwindow); } }; xevents.LeaveNotifyHandlerEvent += (xevent, window, root, subwindow) => { if (LeaveNotifyHandlerEvent != null) { LeaveNotifyHandlerEvent(xevent, window, root, subwindow); } }; xevents.MotionNotifyHandlerEvent += (xevent, window, root, subwindow) => { if (MotionNotifyHandlerEvent != null) { MotionNotifyHandlerEvent(xevent, window, root, subwindow); } }; xevents.FocusInHandlerEvent += (xevent, window) => { if (FocusInHandlerEvent != null) { FocusInHandlerEvent(xevent, window); } }; xevents.FocusOutHandlerEvent += (xevent, window) => { if (FocusOutHandlerEvent != null) { FocusOutHandlerEvent(xevent, window); } }; xevents.KeymapNotifyHandlerEvent += (xevent, window) => { if (KeymapNotifyHandlerEvent != null) { KeymapNotifyHandlerEvent(xevent, window); } }; xevents.GraphicsExposeHandlerEvent += (xevent, window) => { if (GraphicsExposeHandlerEvent != null) { GraphicsExposeHandlerEvent(xevent, window); } }; xevents.NoExposeHandlerEvent += (xevent, window) => { if (NoExposeHandlerEvent != null) { NoExposeHandlerEvent(xevent, window); } }; xevents.VisibilityNotifyHandlerEvent += (xevent, window) => { if (VisibilityNotifyHandlerEvent != null) { VisibilityNotifyHandlerEvent(xevent, window); } }; xevents.CreateNotifyHandlerEvent += (xevent, window, root) => { if (CreateNotifyHandlerEvent != null) { CreateNotifyHandlerEvent(xevent, window, root); } }; xevents.DestroyNotifyHandlerEvent += (xevent, window) => { if (DestroyNotifyHandlerEvent != null) { DestroyNotifyHandlerEvent(xevent, window); } }; xevents.UnmapNotifyHandlerEvent += (xevent, window) => { if (UnmapNotifyHandlerEvent != null) { UnmapNotifyHandlerEvent(xevent, window); } }; xevents.MapNotifyHandlerEvent += (xevent, window) => { if (MapNotifyHandlerEvent != null) { MapNotifyHandlerEvent(xevent, window); } }; xevents.MapRequestHandlerEvent += (xevent, window, root) => { if (MapRequestHandlerEvent != null) { MapRequestHandlerEvent(xevent, window, root); } }; xevents.ReparentNotifyHandlerEvent += (xevent, window, root) => { if (ReparentNotifyHandlerEvent != null) { ReparentNotifyHandlerEvent(xevent, window, root); } }; xevents.ConfigureNotifyHandlerEvent += (xevent, window) => { if (ConfigureNotifyHandlerEvent != null) { ConfigureNotifyHandlerEvent(xevent, window); } }; xevents.ConfigureRequestHandlerEvent += (xevent, window) => { if (ConfigureRequestHandlerEvent != null) { ConfigureRequestHandlerEvent(xevent, window); } }; xevents.GravityNotifyHandlerEvent += (xevent, window) => { if (GravityNotifyHandlerEvent != null) { GravityNotifyHandlerEvent(xevent, window); } }; xevents.ResizeRequestHandlerEvent += (xevent, window) => { if (ResizeRequestHandlerEvent != null) { ResizeRequestHandlerEvent(xevent, window); } }; xevents.CirculateNotifyHandlerEvent += (xevent, window) => { if (CirculateNotifyHandlerEvent != null) { CirculateNotifyHandlerEvent(xevent, window); } }; xevents.CirculateRequestHandlerEvent += (xevent, window, root) => { if (CirculateRequestHandlerEvent != null) { CirculateRequestHandlerEvent(xevent, window, root); } }; xevents.PropertyNotifyHandlerEvent += (xevent, window) => { if (PropertyNotifyHandlerEvent != null) { PropertyNotifyHandlerEvent(xevent, window); } }; xevents.SelectionClearHandlerEvent += (xevent, window) => { if (SelectionClearHandlerEvent != null) { SelectionClearHandlerEvent(xevent, window); } }; xevents.SelectionRequestHandlerEvent += (xevent, window, root, subwindow) => { if (SelectionRequestHandlerEvent != null) { SelectionRequestHandlerEvent(xevent, window, root, subwindow); } }; xevents.SelectionNotifyHandlerEvent += (xevent, window, root) => { if (SelectionNotifyHandlerEvent != null) { SelectionNotifyHandlerEvent(xevent, window, root); } }; xevents.ColormapNotifyHandlerEvent += (xevent, window) => { if (ColormapNotifyHandlerEvent != null) { ColormapNotifyHandlerEvent(xevent, window); } }; xevents.ClientMessageHandlerEvent += (xevent, window) => { if (ClientMessageHandlerEvent != null) { ClientMessageHandlerEvent(xevent, window); } }; xevents.MappingNotifyHandlerEvent += (xevent, window) => { if (MappingNotifyHandlerEvent != null) { MappingNotifyHandlerEvent(xevent, window); } }; Map(); WindowsThread = new Thread(() => { while (xeventsRunner) { xevents.Refresh(); } }); WindowsThread.Start(); OnInitialized(); }