aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-02-11 12:06:00 +0000
committernyamatongwe <devnull@localhost>2003-02-11 12:06:00 +0000
commit441dceeb0ebc55a43872e0dc306875da0a2a094d (patch)
tree5fba2fce493ab51932e384ae198f72f844ccc06b
parentb9c72b26ddd5d0b68ff3b83218c5e02b31349ba1 (diff)
downloadscintilla-mirror-441dceeb0ebc55a43872e0dc306875da0a2a094d.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.
-rw-r--r--gtk/ScintillaGTK.cxx21
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)