From e643c17eea3312b6871ea389d3ab754f030fc3b8 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 13 May 2004 21:02:41 +0000 Subject: Fl_Gl_Window's on WIN32 now prefer accelerated pixel formats over generic formats (STR #382) Fl_Window::resize() did not work on some systems if the window was not shown (STR #373) FLUID did not write the user_data type if the user_data field was empty (STR #374) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3416 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Choice.cxx | 9 ++++++--- src/Fl_x.cxx | 9 +++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Fl_Gl_Choice.cxx b/src/Fl_Gl_Choice.cxx index 9b55f82b8..b99331a6a 100644 --- a/src/Fl_Gl_Choice.cxx +++ b/src/Fl_Gl_Choice.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.17 2004/04/11 04:38:57 easysw Exp $" +// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.18 2004/05/13 21:02:40 easysw Exp $" // // OpenGL visual selection code for the Fast Light Tool Kit (FLTK). // @@ -178,8 +178,11 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int m, const int *alistp) { if ((m & FL_STENCIL) && !pfd.cStencilBits) continue; // see if better than the one we have already: if (pixelformat) { + // offering non-generic rendering is better (read: hardware accelleration) + if (!(chosen_pfd.dwFlags & PFD_GENERIC_FORMAT) && + (pfd.dwFlags & PFD_GENERIC_FORMAT)) continue; // offering overlay is better: - if (!(chosen_pfd.bReserved & 15) && (pfd.bReserved & 15)) {} + else if (!(chosen_pfd.bReserved & 15) && (pfd.bReserved & 15)) {} // otherwise more bit planes is better: else if (chosen_pfd.cColorBits > pfd.cColorBits) continue; else if (chosen_pfd.cDepthBits > pfd.cDepthBits) continue; @@ -347,5 +350,5 @@ void fl_delete_gl_context(GLContext context) { // -// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.17 2004/04/11 04:38:57 easysw Exp $". +// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.18 2004/05/13 21:02:40 easysw Exp $". // diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index c028d43a1..3499e5865 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.33 2004/04/11 04:38:59 easysw Exp $" +// "$Id: Fl_x.cxx,v 1.24.2.24.2.34 2004/05/13 21:02:41 easysw Exp $" // // X specific code for the Fast Light Tool Kit (FLTK). // @@ -932,6 +932,11 @@ void Fl_Window::resize(int X,int Y,int W,int H) { } else { x(X); y(Y); } + + if (resize_from_program && is_a_resize && !resizable()) { + size_range(w(), h(), w(), h()); + } + if (resize_from_program && shown()) { if (is_a_resize) { if (!resizable()) size_range(w(),h(),w(),h()); @@ -1270,5 +1275,5 @@ void Fl_Window::make_current() { #endif // -// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.33 2004/04/11 04:38:59 easysw Exp $". +// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.34 2004/05/13 21:02:41 easysw Exp $". // -- cgit v1.2.3