diff options
author | alberth <alberth@openttd.org> | 2010-12-30 13:16:31 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-12-30 13:16:31 +0000 |
commit | 22a13850cb0640d4fdfd8da66bc46ce20e2eb309 (patch) | |
tree | aab09e147008a843c11fcb356d7e9c7993ea680d /src/window.cpp | |
parent | 703ff560c19e2b21597e9ed25b3e394a2085702a (diff) | |
download | openttd-22a13850cb0640d4fdfd8da66bc46ce20e2eb309.tar.xz |
(svn r21665) -Codechange: Make GetCallbackWnd a method of _thd.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/window.cpp b/src/window.cpp index ae9a683ac..3e601d212 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1400,16 +1400,11 @@ static void DecreaseWindowCounters() } } -Window *GetCallbackWnd() -{ - return FindWindowById(_thd.window_class, _thd.window_number); -} - static void HandlePlacePresize() { if (_special_mouse_mode != WSM_PRESIZE) return; - Window *w = GetCallbackWnd(); + Window *w = _thd.GetCallbackWnd(); if (w == NULL) return; Point pt = GetTileBelowCursor(); @@ -1430,7 +1425,7 @@ static EventState HandleDragDrop() if (_special_mouse_mode != WSM_DRAGDROP) return ES_NOT_HANDLED; if (_left_button_down) return ES_HANDLED; - Window *w = GetCallbackWnd(); + Window *w = _thd.GetCallbackWnd(); if (w != NULL) { /* send an event in client coordinates. */ @@ -1454,7 +1449,7 @@ static EventState HandleMouseDrag() if (_special_mouse_mode != WSM_DRAGDROP) return ES_NOT_HANDLED; if (!_left_button_down || (_cursor.delta.x == 0 && _cursor.delta.y == 0)) return ES_NOT_HANDLED; - Window *w = GetCallbackWnd(); + Window *w = _thd.GetCallbackWnd(); if (w != NULL) { /* Send an event in client coordinates. */ |