Created
October 18, 2021 21:29
-
-
Save nowrep/7e5b4d520cdc9d8a608674239b0fa897 to your computer and use it in GitHub Desktop.
Sway bug #6605
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc sway6605.c -lX11 -o sway6605 | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <X11/Xlib.h> | |
int main() { | |
Display *display; | |
Window window; | |
XEvent event; | |
int screen; | |
display = XOpenDisplay(NULL); | |
screen = DefaultScreen(display); | |
window = XCreateSimpleWindow(display, RootWindow(display, screen), 10, 10, 100, 100, 1, BlackPixel(display, screen), WhitePixel(display, screen)); | |
for (int i = 0; i < 1000; ++i) { | |
XMapWindow(display, window); | |
XFlush(display); | |
usleep(10000); | |
XUnmapWindow(display, window); | |
XFlush(display); | |
} | |
XDestroyWindow(display, window); | |
XCloseDisplay(display); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment