# Fullscreen vs window oddities with mouse cursor

**URL:** <https://discourse.libsdl.org/t/fullscreen-vs-window-oddities-with-mouse-cursor/15269>\
**Category:** SDL Development\
**Created:** [April 19, 2008, 1:17am UTC](https://discourse.libsdl.org/t/fullscreen-vs-window-oddities-with-mouse-cursor/15269 "2008-04-19T01:17:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BugsRus](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/b/ecc23a/32.png) [@BugsRus](https://discourse.libsdl.org/u/BugsRus)\
**Post date:** [April 19, 2008, 1:17am UTC](https://discourse.libsdl.org/t/fullscreen-vs-window-oddities-with-mouse-cursor/15269/1 "2008-04-19T01:17:00Z")

</div>

We were using software blits to render a cursor for the game screen,  
and switched to SDL based cursor for the GUI.

The issue is, in window mode, everything seems to work fine, it would  
switch to the SDL based cursor when it hit any GUI element, and as  
soon as it was moved off, it changed to the software version. This is  
the case, unless we use SDL\_WM\_GrabInput(). If we trap the cursor,  
then it skips/warps to odd places.  
It seems that when the mouse cursor hits a border, it will skip/warp,  
but not all the time.

In full screen mode, as soon as we enabled the SDL cursor when it  
touched the GUI, via SDL\_ShowCursor(SDL\_ENABLE), it would warp back to  
the point where it was first disabled. Which in our case was in  
approximately the center of the screen. This would happen all the  
time, and made using any part of the GUI impossible.

This has been reported on both windows & linux, so is this a  
cross-platform bug, or a design feature?

Will the next version of SDL support colored mouse cursors, or must we  
continue with the software blitting approach?

---

<div class="post-metadata">

**Author:** ![Solra\_Bizna](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@Solra\_Bizna](https://discourse.libsdl.org/u/Solra_Bizna)\
**Post date:** [April 19, 2008, 2:26am UTC](https://discourse.libsdl.org/t/fullscreen-vs-window-oddities-with-mouse-cursor/15269/2 "2008-04-19T02:26:58Z")

</div>

SDL’s behavior regarding mouse handling does a backflip if input is  
grabbed AND the cursor is hidden. This could probably be classified as  
a bug, but bugs with that corner case are to be expected, so you  
should try to work around it by changing the grab state and cursor  
visibility as rarely as possible.  
-:sigma.SB

---

<div class="post-metadata">

**Author:** ![Mason\_Wheeler](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Mason\_Wheeler](https://discourse.libsdl.org/u/Mason_Wheeler)\
**Post date:** [April 19, 2008, 2:33am UTC](https://discourse.libsdl.org/t/fullscreen-vs-window-oddities-with-mouse-cursor/15269/3 "2008-04-19T02:33:54Z")

</div>

I can’t agree with you there. If bugs with that corner case “are to be expected,” then they ought to be anticipated and averted, so you don’t end up with a bug with that corner case. Anyone here know enough about how it works to patch the thing?\> ----- Original Message -----

> From: [sbizna@tejat.net](mailto:sbizna@tejat.net) (Solra Bizna)  
> To: A list for developers using the SDL library. (includes SDL-announce)   
> Sent: Friday, April 18, 2008 7:26:58 PM  
> Subject: Re: [SDL] Fullscreen vs window oddities with mouse cursor
> 
> > SDL’s behavior regarding mouse handling does a backflip if input is  
> > grabbed AND the cursor is hidden. This could probably be classified as  
> > a bug, but bugs with that corner case are to be expected, so you  
> > should try to work around it by changing the grab state and cursor  
> > visibility as rarely as possible.
