diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-09-11 19:32:43 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-09-11 19:32:43 +0000 |
| commit | 421904a7c1a35cd546b794daf80edfa0420a9dd0 (patch) | |
| tree | 6c72c2d316bdfbe29734d4a3a1d1f8262347c8a3 /src/Fl_x.cxx | |
| parent | d0aebb9e464b5d93fd1fd484a243a9582a65b102 (diff) | |
Fixed problems with 2-byte Xpm files on 64-bit platforms (STR
#525)
FLTK didn't handle the ReparentNotify event on X11 (STR #524)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 60567aa53..a3ba4e83b 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_x.cxx,v 1.24.2.24.2.37 2004/06/01 01:08:50 easysw Exp $" +// "$Id: Fl_x.cxx,v 1.24.2.24.2.38 2004/09/11 19:32:43 easysw Exp $" // // X specific code for the Fast Light Tool Kit (FLTK). // @@ -912,6 +912,21 @@ int fl_handle(const XEvent& thisevent) window->resize(X, Y, W, H); break; // allow add_handler to do something too } + + case ReparentNotify: { + int xpos, ypos; + Window junk; + + //ReparentNotify gives the new position of the window relative to + //the new parent. FLTK cares about the position on the root window. + XTranslateCoordinates(fl_display, xevent.xreparent.parent, + XRootWindow(fl_display, fl_screen), + xevent.xreparent.x, xevent.xreparent.y, + &xpos, &ypos, &junk); + + window->position(xpos, ypos); + break; + } } return Fl::handle(event, window); @@ -1279,5 +1294,5 @@ void Fl_Window::make_current() { #endif // -// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.37 2004/06/01 01:08:50 easysw Exp $". +// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.38 2004/09/11 19:32:43 easysw Exp $". // |
