aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/clipping_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/menu/clipping_helper.cpp6
1 files changed, 5 insertions, 1 deletions
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