@@ -198,6 +198,7 @@ extern Window fl_xid_(const Fl_Window* w); | |||||
FL_EXPORT Fl_Window* fl_find(Window xid); | FL_EXPORT Fl_Window* fl_find(Window xid); | ||||
FL_EXPORT void fl_embed ( Fl_Window *w, Window parent ); | FL_EXPORT void fl_embed ( Fl_Window *w, Window parent ); | ||||
extern FL_EXPORT bool fl_embed_called; | |||||
// Dummy function to register a function for opening files via the window manager... | // Dummy function to register a function for opening files via the window manager... | ||||
inline void fl_open_callback(void (*)(const char *)) {} | inline void fl_open_callback(void (*)(const char *)) {} | ||||
@@ -35,6 +35,7 @@ | |||||
#include <FL/Fl_Menu_Window.H> | #include <FL/Fl_Menu_Window.H> | ||||
#include <FL/Fl_Menu_.H> | #include <FL/Fl_Menu_.H> | ||||
#include <FL/fl_draw.H> | #include <FL/fl_draw.H> | ||||
#include <FL/x.H> | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include "flstring.h" | #include "flstring.h" | ||||
@@ -827,7 +828,7 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown( | |||||
Fl_Group::current(0); // fix possible user error... | Fl_Group::current(0); // fix possible user error... | ||||
button = pbutton; | button = pbutton; | ||||
if (pbutton && pbutton->window()) { | |||||
if (pbutton && pbutton->window() && ! fl_embed_called) { | |||||
for (Fl_Window* w = pbutton->window(); w; w = w->window()) { | for (Fl_Window* w = pbutton->window(); w; w = w->window()) { | ||||
X += w->x(); | X += w->x(); | ||||
Y += w->y(); | Y += w->y(); | ||||
@@ -916,8 +916,11 @@ static int wasXExceptionRaised() { | |||||
} | } | ||||
bool fl_embed_called = false; | |||||
void fl_embed ( Fl_Window *w, Window parent ) | void fl_embed ( Fl_Window *w, Window parent ) | ||||
{ | { | ||||
fl_embed_called = true; | |||||
/* this destroys the existing window */ | /* this destroys the existing window */ | ||||
w->hide(); | w->hide(); | ||||
/* embedded windows don't need borders */ | /* embedded windows don't need borders */ | ||||