diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-06-19 15:23:47 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-06-19 15:40:32 +0700 |
commit | 7451d8fce4c50729ab3192c93422fa79c9e4fe85 (patch) | |
tree | 5a3e89989103b43aac1e3c934f4897b11f91ae2e /clipnotify.c | |
parent | a9faca40b3929f22ad1e21c071c853af47b0b7bc (diff) | |
download | clipbuzz-7451d8fce4c50729ab3192c93422fa79c9e4fe85.tar.gz |
Translate from C to Zig 2.0.0
Diffstat (limited to 'clipnotify.c')
-rw-r--r-- | clipnotify.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/clipnotify.c b/clipnotify.c deleted file mode 100644 index f09583e..0000000 --- a/clipnotify.c +++ /dev/null @@ -1,28 +0,0 @@ -#include <X11/Xatom.h> -#include <X11/Xlib.h> -#include <X11/extensions/Xfixes.h> -#include <stdio.h> -#include <stdlib.h> - -int main(void) { - Display *disp; - Window root; - Atom clip; - XEvent evt; - - disp = XOpenDisplay(NULL); - if (!disp) { - fprintf(stderr, "Can't open X display\n"); - exit(1); - } - - root = DefaultRootWindow(disp); - - clip = XInternAtom(disp, "CLIPBOARD", False); - - XFixesSelectSelectionInput(disp, root, XA_PRIMARY, XFixesSetSelectionOwnerNotifyMask); - XFixesSelectSelectionInput(disp, root, clip, XFixesSetSelectionOwnerNotifyMask); - - XNextEvent(disp, &evt); - XCloseDisplay(disp); -} |