diff options
author | nyamatongwe <unknown> | 2003-02-11 12:06:00 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-02-11 12:06:00 +0000 |
commit | 0fb0cba66a214d78fe03b9664e7faacad9b7afcb (patch) | |
tree | 5fba2fce493ab51932e384ae198f72f844ccc06b /gtk/ScintillaGTK.cxx | |
parent | 0ad889e0899272ec4a0cd464699a2d24d484bf14 (diff) | |
download | scintilla-mirror-0fb0cba66a214d78fe03b9664e7faacad9b7afcb.tar.gz |
Ensure mouse motion events are still received by scrollbars after
examination by Scintilla by returning false from signal handler.
Ensure mouse buton presses are still received by container after checking
whether to popup a menu when popup menus turned off.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index bcdf78ca7..ca2c9f70c 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -154,7 +154,7 @@ private: static void SizeRequest(GtkWidget *widget, GtkRequisition *requisition); static void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation); #if GTK_MAJOR_VERSION >= 2 - static void ScrollOver(GtkWidget *widget, GdkEventMotion *event); + static gint ScrollOver(GtkWidget *widget, GdkEventMotion *event); #endif static gint Expose(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis); static gint ExposeMain(GtkWidget *widget, GdkEventExpose *ose); @@ -493,11 +493,12 @@ void ScintillaGTK::SizeAllocate(GtkWidget *widget, GtkAllocation *allocation) { } #if GTK_MAJOR_VERSION >= 2 -void ScintillaGTK::ScrollOver(GtkWidget *widget, GdkEventMotion */*event*/) { +gint ScintillaGTK::ScrollOver(GtkWidget *widget, GdkEventMotion */*event*/) { // Ensure cursor goes back to arrow over scroll bar. GtkWidget *parent = gtk_widget_get_parent(widget); ScintillaGTK *sciThis = ScintillaFromWidget(parent); sciThis->wMain.SetCursor(Window::cursorArrow); + return FALSE; } #endif @@ -1196,12 +1197,16 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) { gtk_selection_convert(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, gdk_atom_intern("STRING", FALSE), event->time); } else if (event->button == 3) { - // PopUp menu - // Convert to screen - int ox = 0; - int oy = 0; - gdk_window_get_origin(PWidget(wMain)->window, &ox, &oy); - ContextMenu(Point(pt.x + ox, pt.y + oy)); + if (displayPopupMenu) { + // PopUp menu + // Convert to screen + int ox = 0; + int oy = 0; + gdk_window_get_origin(PWidget(wMain)->window, &ox, &oy); + ContextMenu(Point(pt.x + ox, pt.y + oy)); + } else { + return FALSE; + } } else if (event->button == 4) { // Wheel scrolling up (only xwin gtk does it this way) if (ctrl) |