diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-12 16:09:06 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-12 16:09:06 +0100 |
| commit | 86eaf0f90577cec8f56f29eaca41d75468f56ffb (patch) | |
| tree | 308c69846b49dbfbf68e88254be0595c509c11c3 /src/Fl_win32.cxx | |
| parent | 4571af24abdac6f79143b4db19b103cf6499ef07 (diff) | |
Fix: Window can be moved while menu is open - cont'd (#1166)
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 509f76767..e7539737f 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1398,11 +1398,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar break; case WM_SETFOCUS: - if (Fl::grab() && (Fl::grab() != window) && Fl::grab()->menu_window()) { - // simulate click at remote location (see issue #1166) - mouse_event(Fl::grab(), 0, 1, MK_LBUTTON, MAKELPARAM(100000, 0)); - return 0; - } if ((Fl::modal_) && (Fl::modal_ != window)) { SetFocus(fl_xid(Fl::modal_)); return 0; @@ -1411,6 +1406,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar break; case WM_KILLFOCUS: + if (Fl::grab() && (Fl::grab() != window) && Fl::grab()->menu_window()) { + // simulate click at remote location (see issue #1166) + mouse_event(Fl::grab(), 0, 1, MK_LBUTTON, MAKELPARAM(100000, 0)); + } Fl::handle(FL_UNFOCUS, window); Fl::flush(); // it never returns to main loop when deactivated... break; |
