From 5e21c7ce233da01593263b03ff237bccc1b3eda1 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 3 Aug 2009 06:26:32 +0000 Subject: Added new Fl_Window:: flags() and methods: - set_menu_window() to mark a window as a menu window - set_tooltip_window() to mark a window as a tooltip window and the corresponding get methods: - menu_window() - tooltip_window(). This is a first step for providing more information for correct parenting and properties to support modern (X) window managers (STR #2230). Please see also the information in fltk.development: http://www.fltk.org/newsgroups.php?gfltk.development+v:8003 ToDo: Another point is to be able to handle menu windows and popup windows that are opened while a menu is active properly (will follow later). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6841 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu.cxx | 2 ++ src/Fl_Tooltip.cxx | 1 + 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 1eba33867..91c5086ef 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -268,6 +268,7 @@ menutitle::menutitle(int X, int Y, int W, int H, const Fl_Menu_Item* L) : end(); set_modal(); clear_border(); + set_menu_window(); menu = L; if (L->labelcolor_ || Fl::scheme() || L->labeltype_ > FL_NO_LABEL) clear_overlay(); } @@ -286,6 +287,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, end(); set_modal(); clear_border(); + set_menu_window(); menu = m; if (m) m = m->first(); // find the first item that needs to be rendered drawn_selected = -1; diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 6c6ab4226..0ca2178de 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -52,6 +52,7 @@ public: /** Creates the box window */ Fl_TooltipBox() : Fl_Menu_Window(0, 0) { set_override(); + set_tooltip_window(); end(); } void draw(); -- cgit v1.2.3