diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-14 13:05:31 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-14 13:05:31 -0400 |
| commit | acbe70b4e5688df23e04ac0e55d8515252a52275 (patch) | |
| tree | 4ad3a6cd2cb7e909dbd6437ffa6b852b09f1561b /redo/uitask_windows.c | |
| parent | 2c8bb7bc6d3b5614d53de957b4dca025c53a9cee (diff) | |
Fixed the infinite loop on Tab control dialog message bug(s) on the Windows backend.
Diffstat (limited to 'redo/uitask_windows.c')
| -rw-r--r-- | redo/uitask_windows.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/redo/uitask_windows.c b/redo/uitask_windows.c index 3101452..9ba418e 100644 --- a/redo/uitask_windows.c +++ b/redo/uitask_windows.c @@ -41,17 +41,19 @@ void uimsgloop(void) if (wcscmp(classchk, areaWindowClass) == 0) dodlgmessage = FALSE; else if (wcscmp(classchk, WC_TABCONTROL) == 0) - istab = TRUE; + // THIS BIT IS IMPORTANT + // if the current tab has no children, then there will be no children left in the dialog to tab to, and IsDialogMessageW() will loop forever + istab = (BOOL) SendMessageW(focus, msgTabCurrentTabHasChildren, 0, 0); } - if (istab) - tabEnterChildren(focus); - // TODO this goes into an infinite loop on a blank tab - if (dodlgmessage) + if (dodlgmessage) { + if (istab) + tabEnterChildren(focus); idm = IsDialogMessageW(active, &msg); - if (istab) - tabLeaveChildren(focus); - if (idm != 0) - continue; + if (istab) + tabLeaveChildren(focus); + if (idm != 0) + continue; + } } TranslateMessage(&msg); DispatchMessageW(&msg); |
