]> git.tdb.fi Git - geometrycompositor.git/commitdiff
Avoid unsigned errors when a window goes off the bottom of the screen
authorMikko Rasa <tdb@tdb.fi>
Sat, 12 Dec 2015 13:26:09 +0000 (15:26 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 12 Dec 2015 13:26:09 +0000 (15:26 +0200)
source/main.c

index 1f1c629216e24a058aaf61e80e63efbba8db01b0..13038c29ef83f6b8292a6e970edd06225c4de652 100644 (file)
@@ -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);