aboutsummaryrefslogtreecommitdiff
path: root/src/draw.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-25 11:11:15 +0100
committerFederico Angelilli <code@fedang.net>2023-11-25 11:11:15 +0100
commit61f65a2e24fb7ac9739db934baa6e9fa53641c5f (patch)
tree7a33aa962e60e3c8a9e96162105cf9832b54bd31 /src/draw.c
parent710672df7e0d1e65b6253efb7af714c326a777db (diff)
Change redraw scheduling and use posix timer in date_update
Diffstat (limited to 'src/draw.c')
-rw-r--r--src/draw.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/draw.c b/src/draw.c
index 9328bed..42c22bd 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -8,10 +8,6 @@
#include "button.h"
#include "log.h"
-// Idea: Either make a to_draw queue where we put things we schedule to redraw
-// (this will also work for animations in the future)
-// or use some flags to trigger drawing
-
static void layout_destroy(Layout *layout)
{
g_object_unref(layout->pl);
@@ -118,13 +114,6 @@ void draw_paint(Drawable *draw, Window *win)
pango_cairo_show_layout(cr, layout->pl);
}
- // Draw midpoint line
- //cairo_set_source_rgba(cr, 1, 1, 1, 1);
- //cairo_set_line_width(cr, 3);
- //cairo_move_to(cr, width / 2, 0);
- //cairo_line_to(cr, width / 2, height);
- //cairo_stroke(cr);
-
cairo_destroy(cr);
// TODO: Move these somewhere else
@@ -230,10 +219,6 @@ void draw_compute_layout(Drawable *draw, Window *win, GList *btns)
MAX(end_xs[1], end_xs[0]),
};
- log_info("e1 = %d, e2 = %d, e3 = %d", end_xs[0], end_xs[1], end_xs[2]);
- log_info("s1 = %d, s2 = %d, s3 = %d", start_xs[0], start_xs[1], start_xs[2]);
- log_info("w1 = %d, w2 = %d, w3 = %d", widths[0], widths[1], widths[2]);
-
int center = round(width / 2);
int center_off = (center - widths[1] / 2) - start_xs[1];
log_debug("Aligning center layout [x=%d, off=%d]", center, center_off);