diff options
| author | Federico Angelilli <code@fedang.net> | 2023-11-16 15:04:17 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2023-11-16 15:25:35 +0100 |
| commit | e4ac6fe8d899574564ecff467f47ef50aedb0c20 (patch) | |
| tree | e820bc5fbcda9277aac21ea6b4ee93d4369ff621 | |
| parent | e4b9aed49eb5464c631960627b63ef703e6e20a4 (diff) | |
Implement `update_xrm` for connection
| -rw-r--r-- | comet.c | 1 | ||||
| -rw-r--r-- | connection.c | 12 |
2 files changed, 11 insertions, 2 deletions
@@ -33,7 +33,6 @@ int main(int argc, char **argv) int screen_width = con->screen_size->width; int screen_height = con->screen_size->height; - log_info("w=%d, h=%d", screen_width, screen_height); int height = EVEN(round(screen_height * 0.021)); int x_padding = EVEN(round(screen_width * 0.005)); diff --git a/connection.c b/connection.c index 0c07c70..8e26283 100644 --- a/connection.c +++ b/connection.c @@ -21,7 +21,17 @@ static bool query_xrm(Connection *con, const char *res, char **value) static void update_xrm(Connection *con) { - // TODO + xcb_flush(con->connection); + xcb_xrm_database_t *database = xcb_xrm_database_from_default(con->connection); + + if (database == NULL) { + log_warning("Xrm database couldn't be updated"); + return; + } + + xcb_xrm_database_free(con->database); + con->database = database; + log_debug("Xrm database updated"); } static void update_scale(Connection *con) |
