From a4814c41c374868e43fd57487c41c68298455f06 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 2 Feb 2007 19:37:30 +0000 Subject: [PATCH] Fix scheme background image bug on X11. Drop changelog for hidden mouse pointer problems since that change was not made until after 1.1.7 was released (CHANGES only shows changes/fixes to the previous release...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 3 ++- src/Fl_Double_Window.cxx | 9 +-------- src/Fl_x.cxx | 7 +++++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 5d5f1fe05..b7c4aac18 100644 --- a/CHANGES +++ b/CHANGES @@ -2,7 +2,8 @@ CHANGES IN FLTK 1.1.8 - Documentation fixes (STR #1454, STR #1455, STR #1456, STR #1457, STR #1458, STR #1460, STR #1481, STR #1578) - - Avoiding hidden mouse pointer in OS X (STR #1475) + - Fl_Double_Window did not always show the scheme + background image. - Fixed first window behavior in OS X (STR #1548) - Fixed calculation of character widths for OS X Quartz rendering (no STR) diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx index 427c43807..29a3b2599 100644 --- a/src/Fl_Double_Window.cxx +++ b/src/Fl_Double_Window.cxx @@ -3,7 +3,7 @@ // // Double-buffered window code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2005 by Bill Spitzak and others. +// Copyright 1998-2007 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -61,13 +61,6 @@ static int can_xdbe() { #endif void Fl_Double_Window::show() { -#if !defined(WIN32) && !defined(__APPLE__) - if (!shown()) { // don't set the background pixel - fl_open_display(); - Fl_X::make_xid(this); - return; - } -#endif Fl_Window::show(); } diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index e37d1ab7b..696cda10c 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -3,7 +3,7 @@ // // X specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2006 by Bill Spitzak and others. +// Copyright 1998-2007 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -1374,7 +1374,10 @@ void Fl_Window::show() { Fl_Tooltip::exit(this); if (!shown()) { fl_open_display(); - if (can_boxcheat(box())) fl_background_pixel = int(fl_xpixel(color())); + // Don't set background pixel for double-buffered windows... + if (type() == FL_WINDOW && can_boxcheat(box())) { + fl_background_pixel = int(fl_xpixel(color())); + } Fl_X::make_xid(this); } else { XMapRaised(fl_display, i->xid);