From 6da996846d7bcc0414b87c47efa9dbea5e1f4600 Mon Sep 17 00:00:00 2001 From: Rr42 Date: Fri, 29 Jun 2018 13:38:48 +0530 Subject: Bug fix: Fixes a bug where draw area puckups mouse clicks in the IoList. --- ldmicro/ldmicro.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ldmicro/ldmicro.cpp b/ldmicro/ldmicro.cpp index be02fd5..ea4e1f0 100644 --- a/ldmicro/ldmicro.cpp +++ b/ldmicro/ldmicro.cpp @@ -719,6 +719,17 @@ gboolean LD_GTK_mouse_click_hook(GtkWidget *widget, GdkEvent *event, gpointer us * WM_LBUTTONDBLCLK, WM_LBUTTONDOWN */ + RECT Rect; + GetWindowRect(ScrollWindow, &Rect); + int wy; + gtk_window_get_position(GTK_WINDOW(MainWindow), NULL, &wy); + + // g_print("net: %i\n", wy + 30 + Rect.bottom); + + /// Identify if mouse is clicked outside drawing area + if (wy + 30 + Rect.bottom < event->button.y_root) + return FALSE; + GtkAdjustment *adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(ScrollWindow)); switch(event->button.type) -- cgit