diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2005-11-01 16:48:19 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2005-11-01 16:48:19 +0000 |
| commit | e7ea8bbe97b1c9388302fc25762b6e0412ddabbc (patch) | |
| tree | 2e3a5dfa504d9f3a79b5a60a2b1ac515c13782d8 /src | |
| parent | 134629c861218a4f9a0a78f5473b440e5d21a158 (diff) | |
STR #1057: A window that is needed to correctly manage a timer on WIN32 (personally, I would like to mark this WTF ;-), was actually visible. I resized it to 0x0 ixels, but if that fails, we fall back to the old 1x1 pixels. I also removed the "default" positioning since that messes up the default window stacking for pedantic users.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
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); } |
