From 77d65c98a8330a00d9cad8c10177660ebc685f9c Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 26 Oct 2012 18:38:30 +0200 Subject: menu: fix calculate window coordinates --- src/menu/clipping_helper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/menu/clipping_helper.cpp') diff --git a/src/menu/clipping_helper.cpp b/src/menu/clipping_helper.cpp index 425e9dec..1a92d3f1 100644 --- a/src/menu/clipping_helper.cpp +++ b/src/menu/clipping_helper.cpp @@ -45,7 +45,11 @@ namespace usdx // calculate window coordinates of rectangle if (parent) { int offset = parent->get_size().get_height() - rect.get_bottom(); - new_scissor_box.set_top(parent->get_window_coords().get_y() + offset); + new_scissor_box.set_top(parent->get_window_coords().get_y() + + offset); + + new_scissor_box.set_left(parent->get_window_coords().get_x() + + rect.get_left()); } // calculate intersection of old clipping and requested clipping -- cgit v1.2.3