-
Notifications
You must be signed in to change notification settings - Fork 0
/
white.c
37 lines (27 loc) · 847 Bytes
/
white.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <xcb/xcb.h>
#include <sys/types.h>
#include <stdlib.h> // exit
#include <stdio.h> // printf
#include <xcb/xcb.h> // color
int
main ()
{
xcb_connection_t* connection;
xcb_screen_t* screen;
xcb_window_t root_window;
uint32_t params[1];
connection = xcb_connect(NULL, NULL);
// first screen
screen = xcb_setup_roots_iterator(xcb_get_setup(connection)).data;
if (!screen)
return 0;
root_window = screen->root;
params[0] = screen->white_pixel;
// sets the root_window back_pixel to pixel(params)
xcb_change_window_attributes(connection, root_window, XCB_CW_BACK_PIXEL, params);
// waits all things are send??
xcb_flush(connection);
// xcb_destroy_window(connection, window);
xcb_disconnect(connection);
return 0;
}