STR #1387

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 ]

STR #1387

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Summary:fltk main loop hogs cpu, when window size becomes 0,0
Created By:xovo
Assigned To:matt
Fix Version:1.1-current (SVN: v5346)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files

Trouble Report Comments:

Name/Time/Date Text top right image
#1 xovo
12:13 Aug 03, 2006
With the program below (which is a stripped-down version of a normal use case in my application) fltk uses 100% cpu.
I'm aware that size 0,0 might not be really supported, but i would prefer fltk to handle this case instead of using a workaround.


#include <FL/Fl.H>
#include <FL/Fl_Gl_Window.H>
#include <stdio.h>

int main(int argc, char **argv)
    Fl_Window *window = new Fl_Window(300,200);
    window->clear_border(); // no border!!

    // wait some time

    while(true) {
        printf("LOOP ");
        // doesn't wait....

    return 0;
#2 matt
03:52 Aug 17, 2006
On which operating system?  
#3 xovo
05:35 Aug 17, 2006
that's on Windows XP  
#4 matt
04:50 Aug 23, 2006
Fixed in Subversion repository.

Zero size windows countinously trigger WM_PAINT events. This is a knowns issue and a bug in WIN32. We now avaoid that by simply resizing windows to at least 1x1. If you need an invisible window, just hide it ;-)
bottom left image   bottom right image

Return to Bugs & Features ]


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