diff options
-rw-r--r-- | gtk/PlatGTK.cxx | 4 | ||||
-rw-r--r-- | gtk/ScintillaGTK.cxx | 10 | ||||
-rw-r--r-- | include/Platform.h | 2 | ||||
-rw-r--r-- | include/Scintilla.h | 2 | ||||
-rw-r--r-- | include/Scintilla.iface | 5 |
5 files changed, 17 insertions, 6 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 5276d75f2..d0c298685 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -867,8 +867,10 @@ void Platform::DebugPrintf(const char *, ...) { // Not supported for GTK+ static bool assertionPopUps = true; -void Platform::ShowAssertionPopUps(bool assertionPopUps_) { +bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { + bool ret = assertionPopUps; assertionPopUps = assertionPopUps_; + return ret; } void Platform::Assert(const char *c, const char *file, int line) { diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 83ba91798..34d3e2289 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -473,10 +473,12 @@ void ScintillaGTK::SetTicking(bool on) { } void ScintillaGTK::SetMouseCapture(bool on) { - if (on) { - gtk_grab_add(GTK_WIDGET(wDraw.GetID())); - } else { - gtk_grab_remove(GTK_WIDGET(wDraw.GetID())); + if (mouseDownCaptures) { + if (on) { + gtk_grab_add(GTK_WIDGET(wDraw.GetID())); + } else { + gtk_grab_remove(GTK_WIDGET(wDraw.GetID())); + } } capturedMouse = on; } diff --git a/include/Platform.h b/include/Platform.h index afcc4f61c..099e5ee22 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -405,7 +405,7 @@ public: return static_cast<short>(x & 0xffff); } static void DebugPrintf(const char *format, ...); - static void ShowAssertionPopUps(bool assertionPopUps_); + static bool ShowAssertionPopUps(bool assertionPopUps_); static void Assert(const char *c, const char *file, int line); static int Clamp(int val, int minVal, int maxVal); }; diff --git a/include/Scintilla.h b/include/Scintilla.h index 42fc2c8d0..68df0c82e 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -370,6 +370,8 @@ typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wPara #define SCI_GETFOCUS 2381 #define SCI_SETSTATUS 2382 #define SCI_GETSTATUS 2383 +#define SCI_SETMOUSEDOWNCAPTURES 2384 +#define SCI_GETMOUSEDOWNCAPTURES 2385 #define SCI_GRABFOCUS 2400 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 8b9073585..d8b7904a3 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1003,6 +1003,11 @@ set void SetStatus=2382(int statusCode,) # Get error status get int GetStatus=2383(,) +# Set whether the mouse is captured when its button is pressed +set void SetMouseDownCaptures=2384(bool captures,) +# Get whether mouse gets captured +get bool GetMouseDownCaptures=2385(,) + # Set the focus to this Scintilla widget. # GTK+ Specific fun void GrabFocus=2400(,) |