mirror of
https://github.com/fltk/fltk.git
synced 2026-05-29 04:26:27 +08:00
Fl_Sys_Menu_Bar under MacOS: prevent the FLTK object from receiving events.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12629 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -44,6 +44,11 @@ static void move_tab_cb(Fl_Widget *, void *data);
|
|||||||
static void merge_all_windows_cb(Fl_Widget *, void *data);
|
static void merge_all_windows_cb(Fl_Widget *, void *data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
void Fl_MacOS_Sys_Menu_Bar_Driver::draw() {
|
||||||
|
bar->deactivate(); // prevent Fl_Sys_Menu_Bar object from receiving events
|
||||||
|
}
|
||||||
|
|
||||||
Fl_MacOS_Sys_Menu_Bar_Driver* Fl_MacOS_Sys_Menu_Bar_Driver::driver() {
|
Fl_MacOS_Sys_Menu_Bar_Driver* Fl_MacOS_Sys_Menu_Bar_Driver::driver() {
|
||||||
static Fl_MacOS_Sys_Menu_Bar_Driver *once = new Fl_MacOS_Sys_Menu_Bar_Driver();
|
static Fl_MacOS_Sys_Menu_Bar_Driver *once = new Fl_MacOS_Sys_Menu_Bar_Driver();
|
||||||
if (driver_ != once) {
|
if (driver_ != once) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public:
|
|||||||
Fl_MacOS_Sys_Menu_Bar_Driver();
|
Fl_MacOS_Sys_Menu_Bar_Driver();
|
||||||
virtual ~Fl_MacOS_Sys_Menu_Bar_Driver();
|
virtual ~Fl_MacOS_Sys_Menu_Bar_Driver();
|
||||||
virtual void update();
|
virtual void update();
|
||||||
virtual void draw() {}
|
virtual void draw();
|
||||||
virtual void about(Fl_Callback *cb, void *data);
|
virtual void about(Fl_Callback *cb, void *data);
|
||||||
virtual int add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags);
|
virtual int add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags);
|
||||||
virtual int add(const char* str);
|
virtual int add(const char* str);
|
||||||
|
|||||||
Reference in New Issue
Block a user