diff options
Diffstat (limited to 'barriermanager.h')
-rw-r--r-- | barriermanager.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/barriermanager.h b/barriermanager.h new file mode 100644 index 0000000..b5b4186 --- /dev/null +++ b/barriermanager.h @@ -0,0 +1,37 @@ + +// XineramaBarriers +// ---------- +// Copyright (C) 2011, Timur Kristóf +// +// This X client application will create pointer barriers +// based on the Xinerama information of your current driver. +// Only works with XFixes v5 or higher and the Xorg server +// which has the pointer barriers patch. +// ---------- +// Licensed under the terms of the GPL +// ---------- + +#ifndef BARRIERMANAGER_H +#define BARRIERMANAGER_H + +#include <X11/extensions/Xinerama.h> +#include <X11/extensions/Xfixes.h> +#include <X11/extensions/xfixesproto.h> +#include <vector> + +#define MIN(a, b) (((a) < (b)) ? a : b) + +class BarrierManager { + std::vector<PointerBarrier> barriers; + std::vector<XineramaScreenInfo> infos; + XWindowAttributes attrs; + Display *d; + +public: + explicit BarrierManager(Display *d); + ~BarrierManager(); + void updateBarriers(); + void destroyBarriers(); +}; + +#endif // BARRIERMANAGER_H |