aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/unified_window.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/unified_window.vala')
-rw-r--r--main/src/ui/unified_window.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/ui/unified_window.vala b/main/src/ui/unified_window.vala
index 97ef7ed4..61a22085 100644
--- a/main/src/ui/unified_window.vala
+++ b/main/src/ui/unified_window.vala
@@ -70,8 +70,9 @@ public class UnifiedWindow : Gtk.Window {
if (event.type == EventType.BUTTON_PRESS) {
int dest_x, dest_y;
bool ret = search_box.translate_coordinates(this, 0, 0, out dest_x, out dest_y);
- print(@"ret $(ret) button-x $(event.button.x_root) !< dest_x $(dest_x)\n");
- if (ret && event.button.x_root < dest_x) {
+ int geometry_x, geometry_y, geometry_width, geometry_height;
+ this.get_window().get_geometry(out geometry_x, out geometry_y, out geometry_width, out geometry_height);
+ if (ret && event.button.x_root - geometry_x < dest_x || event.button.y_root - geometry_y < dest_y) {
close_search();
}
} else if (event.type == EventType.KEY_RELEASE) {