diff options
author | rubidium <rubidium@openttd.org> | 2013-06-29 18:21:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-06-29 18:21:19 +0000 |
commit | 4fbcb73166f5707dee330358b9ba4430f6d2c482 (patch) | |
tree | 2e349fa21e6cb6ec22b0279568056ca13f117a00 | |
parent | ccf36ca71bf633b260be25011bcf7553a9ee2dfa (diff) | |
download | openttd-4fbcb73166f5707dee330358b9ba4430f6d2c482.tar.xz |
(svn r25523) -Fix [FS#5587]: SDL does not give an event when an application gets mouse focus while going to full screen, so manually force the mouse-is-in-window state
-rw-r--r-- | src/video/sdl_v.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 736e069ce..d66ad59a8 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -393,6 +393,11 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h) _screen.dst_ptr = newscreen->pixels; _sdl_screen = newscreen; + /* When in full screen, we will always have the mouse cursor + * within the window, even though SDL does not give us the + * appropriate event to know this. */ + if (_fullscreen) _cursor.in_window = true; + Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter(); blitter->PostResize(); |