diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-11-20 04:18:44 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-11-20 04:18:44 +0000 |
| commit | 64f0dbc2a53e46728b16c77e29fe42b6dafacfa1 (patch) | |
| tree | f4d2bc5646e036afc5e2dec1ff1ed04e944d7954 | |
| parent | fc8d065cd73f6a9a5477ea5106da6b26c5cf9a29 (diff) | |
- FLTK windows could appear off-screen on X11 (STR #586)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3899 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | src/Fl_x.cxx | 9 |
2 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.6 + - FLTK windows could appear off-screen on X11 (STR #586) - The configure script did not support --disable-localfoo to completely disable image file support (STR #582) diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index a3ba4e83b..d13c01b40 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.38 2004/09/11 19:32:43 easysw Exp $" +// "$Id: Fl_x.cxx,v 1.24.2.24.2.39 2004/11/20 04:18:44 easysw Exp $" // // X specific code for the Fast Light Tool Kit (FLTK). // @@ -924,6 +924,8 @@ int fl_handle(const XEvent& thisevent) xevent.xreparent.x, xevent.xreparent.y, &xpos, &ypos, &junk); + // tell Fl_Window about it and set flag to prevent echoing: + resize_bug_fix = window; window->position(xpos, ypos); break; } @@ -1016,10 +1018,13 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap) if (H <= 0) H = 1; // X don't like zero... if (!win->parent() && !Fl::grab()) { // center windows in case window manager does not do anything: +#ifdef FL_CENTER_WINDOWS if (!(win->flags() & Fl_Window::FL_FORCE_POSITION)) { win->x(X = (Fl::w()-W)/2); win->y(Y = (Fl::h()-H)/2); } +#endif // FL_CENTER_WINDOWS + // force the window to be on-screen. Usually the X window manager // does this, but a few don't, so we do it here for consistency: if (win->border()) { @@ -1294,5 +1299,5 @@ void Fl_Window::make_current() { #endif // -// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.38 2004/09/11 19:32:43 easysw Exp $". +// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.39 2004/11/20 04:18:44 easysw Exp $". // |
