aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compositor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compositor.c b/src/compositor.c
index c6b2059..29d3c15 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -100,7 +100,7 @@ void ngxc_compositor_add_window(ngxc_compositor *self, Window window) {
window_obj->y = xattr.y;
self->num_windows++;
- fprintf(stderr, "ADDED WINDOW: %ld, x: %d, y: %d\n", window, xattr.x, xattr.y);
+ fprintf(stderr, "ADDED WINDOW (#%d): %ld, x: %d, y: %d\n", self->num_windows, window, xattr.x, xattr.y);
}
static void ngxc_compositor_remove_window_index(ngxc_compositor *self, int window_index) {
@@ -178,13 +178,13 @@ static void render_texture(GLuint texture_id, int x, int y, int width, int heigh
}
/* TODO: Skip windows that are not visible on the screen */
-/* TODO: Disable compositing for fullscreen windows, if that option is enabled */
+/* TODO: Disable compositing for fullscreen windows, if that option is enabled. Or only draw the fullscreen window */
void ngxc_compositor_render(ngxc_compositor *self) {
glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
if(self->wallpaper_texture.texture_id > 0) {
- render_texture(self->wallpaper_texture.texture_id, 0, 0, self->wallpaper_texture.width, self->wallpaper_texture.height);
+ //render_texture(self->wallpaper_texture.texture_id, 0, 0, self->wallpaper_texture.width, self->wallpaper_texture.height);
}
for(int i = 0; i < self->num_windows; ++i) {
@@ -201,7 +201,7 @@ void ngxc_compositor_render(ngxc_compositor *self) {
glFinish();
const double time_limit = 1.0f / 60.0f; // TODO: Get from randr. This might not be a good way to do this when using multiple monitors with different refresh rate and opengl is synced to one monitor
- const double delayed_update = time_limit - frame_duration - 0.003;
+ const double delayed_update = time_limit - frame_duration - 0.002;
//fprintf(stderr, "delayed update: %f\n", delayed_update);
if(delayed_update > 0.0)
usleep(delayed_update * 1000000.0);