From: Mikko Rasa Date: Sat, 12 Dec 2015 13:26:09 +0000 (+0200) Subject: Avoid unsigned errors when a window goes off the bottom of the screen X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=03938166b24208348b4ea25600b4d06c8fd2400a;p=geometrycompositor.git Avoid unsigned errors when a window goes off the bottom of the screen --- diff --git a/source/main.c b/source/main.c index 1f1c629..13038c2 100644 --- a/source/main.c +++ b/source/main.c @@ -910,7 +910,7 @@ void refresh_screen(Compositor *compositor, CompositedScreen *screen) glBindTexture(GL_TEXTURE_2D, window->texture); compositor->glXBindTexImageEXT(compositor->display, window->glx_pixmap, GLX_FRONT_LEFT_EXT, NULL); glUniform4f(screen->geometry_loc, - (float)window->x/screen->width, (float)(screen->height-window->y-window->height)/screen->height, + (float)window->x/screen->width, ((float)screen->height-window->y-window->height)/screen->height, (float)(window->width+2*window->border)/screen->width, (float)(window->height+2*window->border)/screen->height); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); compositor->glXReleaseTexImageEXT(compositor->display, window->glx_pixmap, GLX_FRONT_LEFT_EXT);