STR #1321: Calling Fl_Window::show() will exit from the current Fl_Tooltip. Changing window order or creating a new window is a pretty major action, so temporarily disabeling Tooltips seems beneficial. This avoids Tooltips interfering with popup menus.

Of course, poping up a tooltip window does *not* disable further tooltips... .

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5200 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-06-14 10:48:36 +00:00
parent bc03e9b1a9
commit c468a521b0
5 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.8
- Showing any window will disable the current tooltip
so it won't pop over menus (STR #1321)
- Updated documentation to reflect limitation of
Fl::delete_widget() (STR #1306)
- Fixed line wrapping in Fl_Text_Display (STR #1227)

View File

@ -56,6 +56,7 @@ extern "C" {
#include <FL/x.H>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Tooltip.H>
#include <FL/Fl_Sys_Menu_Bar.H>
#include <stdio.h>
#include <stdlib.h>
@ -1972,6 +1973,7 @@ void Fl_Window::show() {
} else {
labeltype(FL_NO_LABEL);
}
Fl_Tooltip::exit_(this);
if (!shown() || !i) {
Fl_X::make(this);
} else {

View File

@ -33,6 +33,7 @@
#include <FL/x.H>
#include <FL/Fl_Window.H>
#include <FL/Enumerations.H>
#include <FL/Fl_Tooltip.H>
#include "flstring.h"
#include "Fl_Font.H"
#include <stdio.h>
@ -1512,6 +1513,7 @@ void Fl_Window::show() {
} else {
labeltype(FL_NO_LABEL);
}
Fl_Tooltip::exit_(this);
if (!shown()) {
// if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color());
Fl_X::make(this);

View File

@ -38,6 +38,7 @@
# include <FL/Fl.H>
# include <FL/x.H>
# include <FL/Fl_Window.H>
# include <FL/Fl_Tooltip.H>
# include <stdio.h>
# include <stdlib.h>
# include "flstring.h"
@ -1329,6 +1330,7 @@ void Fl_Window::show() {
} else {
labeltype(FL_NO_LABEL);
}
Fl_Tooltip::exit_(this);
if (!shown()) {
fl_open_display();
if (can_boxcheat(box())) fl_background_pixel = int(fl_xpixel(color()));

View File

@ -184,9 +184,11 @@ int main(int argc, char **argv) {
menubar.callback(test_cb);
menus[0] = &menubar;
Fl_Menu_Button mb1(100,100,120,25,"&menubutton"); mb1.menu(pulldown);
mb1.tooltip("this is a menu button");
mb1.callback(test_cb);
menus[1] = &mb1;
Fl_Choice ch(300,100,80,25,"&choice:"); ch.menu(pulldown);
ch.tooltip("this is a choice menu");
ch.callback(test_cb);
menus[2] = &ch;
Fl_Menu_Button mb(0,0,WIDTH,400,"&popup");