FLTK logo

STR #46

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]

STR #46

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:2 - Specific to an operating system
Subsystem:WIN32
Summary:FL_Double_Window can not have nested windows on Win32
Version:1.1.4rc1
Created By:zaplia.mail
Assigned To:mike
Fix Version:1.1.4
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 ciudadsatan.hotmail
18:10 May 27, 2003
nested_error.cxx
0k
 
 
#2 ciudadsatan.hotmail
18:14 May 27, 2003
nested_error.png
3k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 zaplia.mail
02:59 May 27, 2003
This bug was not solved.
Place top Double_window with nested window (single or double) placed partially outside the desctop, then switch to another app which hide the fltk window, then switch to fltk window back (by programs bar). CPU will be 100% and window will not be redrawn. The cause is - not correct region reported as valid after the WM_PAINT processing.
  
 
 
#2 mike
07:08 May 27, 2003
Please provide sample code which demonstrates this problem, along with the compiler, version of Windows, and graphics card you are using.

We have been unable to duplicate this problem here.
 
 
#3 ciudadsatan.hotmail
18:35 May 27, 2003
Attached a program example and screenshot of the bug, using mingw in windows 98.

How to trigger it: compile the source in your favorite compiler. Before running the program, make sure some other application is maximized. Run the program, move the window so that the red box is partially off-screen, change to the maximized application then back to the example. That's all.

Also, at least in my system (graphic card in mainboard: SiS 630), whenever the bug is triggered and I try to move the window, it doesn't react immediately, as if the CPU is working it its limits.
However (and this is strange), if in Windows' Screen Properties I enter at Configuration / Advanced / Adaptator (where graphic card info is shown), that last bug doesn't happen (the red subwindow isn't drawn anyway).

Some more info:
The patches regarding this revolve around Fl_win32.cxx at line 616, originally:

    ValidateRgn(hWnd,i->region);

Now changed to:

    if (window->parent()) ValidateRgn(hWnd,0);
        else ValidateRgn(hWnd,i->region);

Which doesn't really solve anything. Just to try something, I did:

    if (window->parent()) {ValidateRgn(hWnd,0);printf("c");}
        else {ValidateRgn(hWnd,i->region);printf("w");}

When the bug triggered, I received lots of "w" in stdout.


BTW, some time ago, I saw this bug causing a crash in Windows XP (dunno the graphic card), but I don't have access to that operating system now (maybe it's fixed, maybe not). Can someone try my demo there?
 
 
#4 ciudadsatan.hotmail
18:44 May 27, 2003
Forgot some things:

After the bug is triggered, it won't happen again unless you run the bugged program again.

Also, if right after launching the demo, before moving it off-screen, I switch to any maximized application, the bug doesn't happen, even if now is moved off-screen and all that.


Maxed windows are not required, but the bug "works better" that way.
 
 
#5 zaplia.mail
22:49 May 27, 2003
Win2000 WS sp ~2, Wi2000 Advserv
VC6sp5
different gr-cards on different machines (ASUS,INTEL,NVIDIA..).
---
Code is doublebuffer example from fltk tests with
parent Fl_Window changed to Fl_Double_Window
 
 
#6 mike
04:20 May 31, 2003
Hmm, perhaps if we limit the validate-to-a-region code to single buffered windows it will work?  This smacks of a Windows driver bug (probably something in the sample driver Microsoft puts out), but as I've said before without region validation we don't get complete redraws in single buffered windows...  
 
#7 ciudadsatan.hotmail
12:43 May 31, 2003
How does no region validation screws up single buffered windows redraws? I've been trying "ValidateRgn(hWnd,0)" and all seems ok...

 
 
#8 mike
16:33 Jun 11, 2003
Partial redraws get lost with some versions of Windows if you don't validate the region that was actually drawn.  
 
#9 mike
18:29 Jun 11, 2003
Please check current CVS for an update that only validated single-buffered windows.  
 
#10 ciudadsatan.hotmail
13:57 Jun 12, 2003
Works without any problems under mingw/win98.  
 
#11 mike
14:37 Jun 12, 2003
Great!  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.