|
@@ -244,7 +244,7 @@ get_section(const char *section)
|
|
|
{
|
|
|
if (strcmp(section, "TopLeft") == 0)
|
|
|
return 0;
|
|
|
- else if (strcmp(section, "TopCenter") == 0 || strcmp(section, "TopCentre") == 0)
|
|
|
+ else if (strcmp(section, "TopCentre") == 0)
|
|
|
return 1;
|
|
|
else if (strcmp(section, "TopRight") == 0)
|
|
|
return 2;
|
|
@@ -252,7 +252,7 @@ get_section(const char *section)
|
|
|
return 3;
|
|
|
else if (strcmp(section, "BottomRight") == 0)
|
|
|
return 4;
|
|
|
- else if (strcmp(section, "BottomCenter") == 0 || strcmp(section, "BottomCentre") == 0)
|
|
|
+ else if (strcmp(section, "BottomCentre") == 0)
|
|
|
return 5;
|
|
|
else if (strcmp(section, "BottomLeft") == 0)
|
|
|
return 6;
|
|
@@ -340,6 +340,12 @@ int
|
|
|
main(int argc, char *argv[])
|
|
|
{
|
|
|
xcb_connection_t *conn = xcb_connect(NULL, NULL);
|
|
|
+
|
|
|
+ if (xcb_connection_has_error(conn) > 0) {
|
|
|
+ fprintf(stderr, "Cannot connect to X\n");
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
xcb_screen_t *screen = xcb_setup_roots_iterator(xcb_get_setup(conn)).data;
|
|
|
|
|
|
init_options(screen->width_in_pixels, screen->height_in_pixels);
|
|
@@ -350,6 +356,7 @@ main(int argc, char *argv[])
|
|
|
|
|
|
server_create_windows(conn, screen);
|
|
|
server_event_loop(conn);
|
|
|
+
|
|
|
xcb_disconnect(conn);
|
|
|
|
|
|
return 0;
|