diff options
author | Rr42 | 2018-06-29 13:38:48 +0530 |
---|---|---|
committer | Rr42 | 2018-06-29 13:38:48 +0530 |
commit | 6da996846d7bcc0414b87c47efa9dbea5e1f4600 (patch) | |
tree | ad74de01067e3b23349fc1064841ea2d6a1802c0 | |
parent | 169b2cedb1a17c3ab537b3d39a3758d5742ba043 (diff) | |
download | LDMicroGtk-6da996846d7bcc0414b87c47efa9dbea5e1f4600.tar.gz LDMicroGtk-6da996846d7bcc0414b87c47efa9dbea5e1f4600.tar.bz2 LDMicroGtk-6da996846d7bcc0414b87c47efa9dbea5e1f4600.zip |
Bug fix: Fixes a bug where draw area puckups mouse clicks in the IoList.
-rw-r--r-- | ldmicro/ldmicro.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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) |