diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 345d76ea9..4eb2a1262 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1383,11 +1383,18 @@ void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data) wc.hInstance = fl_display; wc.lpszClassName = timer_class; ATOM atom = RegisterClassEx(&wc); - + // create a zero size window to handle timer events s_TimerWnd = CreateWindowEx(WS_EX_LEFT | WS_EX_TOOLWINDOW, timer_class, "", WS_POPUP, - CW_USEDEFAULT, CW_USEDEFAULT, 1, 1, + 0, 0, 0, 0, + NULL, NULL, fl_display, NULL); + // just in case this OS won't let us create a 0x0 size window: + if (!s_TimerWnd) + s_TimerWnd = CreateWindowEx(WS_EX_LEFT | WS_EX_TOOLWINDOW, + timer_class, "", + WS_POPUP, + 0, 0, 1, 1, NULL, NULL, fl_display, NULL); ShowWindow(s_TimerWnd, SW_SHOWNOACTIVATE); } |
