qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Adam D. Moss" <aspirin@ntlworld.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: sdl fix for mouse grab/hide
Date: Thu, 25 May 2006 17:40:19 -0000	[thread overview]
Message-ID: <e54pah$d5q$1@sea.gmane.org> (raw)
In-Reply-To: <20060525110137.GB17024@MAIL.13thfloor.at>

Herbert Poetzl wrote:
> which is almost met, except for qemu _not_ using
> the SDL_ShowCursor() but instead doing a special
> SDL_SetCursor(sdl_cursor_hidden), which results in
> SDL _not_ transmitting the relative motion events
> once the border is reached, which in turn gives
> funny behaviour :)

The code you're changing was added to work-around a supposed
SDL bug in the first place.  Below is the text of the original
2006-03-01 posting for the change, by anthony@codemonkey.ws
--adam
------------------------------------------------------
There appears to bug a bug in the latest version of SDL (1.2.9) that 
causes the position of the cursor to be wrongly reported after calling 
SDL_ShowCursor(0).

When the cursor is disabled, relative and absolute mouse events are 
reported as garbage.

This patch works around this by using a invisible cursor instead of 
disabling the cursor.  This has the same functionality of disabling the 
cursor but avoids these problems.

For what it's worth, disabling the cursor in older versions of SDL also 
has strange side effects.  For instance, the cursor gets warped when you 
hit the edge of the bounding box.  If you're using an absolute input 
device (emulating a Wacom or Synaptics touchpad for instance), this 
results in weird mouse behavior (when you exit this window, your mouse 
ends up in the middle of the window!).

Avoiding SDL_ShowCursor(0) is probably a good idea regardless of this 
particular bug.

      reply	other threads:[~2006-05-25 17:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 11:01 [Qemu-devel] sdl fix for mouse grab/hide Herbert Poetzl
2006-05-25 17:40 ` Adam D. Moss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e54pah$d5q$1@sea.gmane.org' \
    --to=aspirin@ntlworld.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).