From f3f101fd257d9f93bbf916f9d4e8ce939ef30136 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 11 Mar 2004 05:43:41 +0000
Subject: [PATCH] tiny change to really really really avoid mouse click events
 to be passed to the invisble menubar on Mac OS X (when HAVE_FL_SYS_MENUBAR is
 defined)

---
 Fltk/GUI.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index d726ce982e..a1eb2972db 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.277 2004-03-05 23:47:35 geuzaine Exp $
+// $Id: GUI.cpp,v 1.278 2004-03-11 05:43:41 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -862,7 +862,12 @@ void GUI::create_menu_window(int argc, char **argv)
 
 #if defined(__APPLE__) && defined(HAVE_FL_SYS_MENU_BAR)
   if(CTX.system_menu_bar){
-    m_sys_menu_bar = new Fl_Sys_Menu_Bar(0, 0, width, BH);
+    // the system menubar is kind of a hack in fltk--it still creates
+    // a real (invisible) menubar. So we make it a 1x1 pixel rectangle
+    // (and 1 pixel off the edge, so it falls behind the navigation
+    // buttons) to really really really avoid unwanted mouse click
+    // events.
+    m_sys_menu_bar = new Fl_Sys_Menu_Bar(1, 1, 1, 1);
     m_sys_menu_bar->menu(m_sys_menubar_table);
     m_sys_menu_bar->global();
     Fl_Box *o = new Fl_Box(0, 0, width, BH + 6);
-- 
GitLab