From d2cc815009ba1b446e0727e1808332965caacc5a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 10 Mar 2014 13:39:30 +0100 Subject: [PATCH] Only set the monitor callback once. --- tests/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/events.c b/tests/events.c index 71f88080..d9a5eea2 100644 --- a/tests/events.c +++ b/tests/events.c @@ -476,6 +476,8 @@ int main(int argc, char** argv) printf("Library initialized\n"); + glfwSetMonitorCallback(monitor_callback); + while ((ch = getopt(argc, argv, "hfn:")) != -1) { switch (ch) @@ -557,8 +559,6 @@ int main(int argc, char** argv) glfwSetWindowUserPointer(slots[i].window, slots + i); - glfwSetMonitorCallback(monitor_callback); - glfwSetWindowPosCallback(slots[i].window, window_pos_callback); glfwSetWindowSizeCallback(slots[i].window, window_size_callback); glfwSetFramebufferSizeCallback(slots[i].window, framebuffer_size_callback);