From 441dceeb0ebc55a43872e0dc306875da0a2a094d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 11 Feb 2003 12:06:00 +0000 Subject: 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. --- gtk/ScintillaGTK.cxx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'gtk') 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) -- cgit v1.2.3