<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Hardware Mouse Cursor questions</title>
		<link>http://www.allegro.cc/forums/view/587459</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 08 Sep 2006 02:26:14 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How many different setups of the mouse is there?</p><p>I have been playing around with my mouse code - the one I used to use made the mouse trapped inside the window even if I was in windowed mode, so that obviously needed a change.</p><p>So now - using code like this to set up the mouse:
</p><div class="source-code snippet"><div class="inner"><pre>  <a href="http://www.allegro.cc/manual/enable_hardware_cursor" target="_blank"><span class="a">enable_hardware_cursor</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>

  <a href="http://www.allegro.cc/manual/set_mouse_sprite" target="_blank"><span class="a">set_mouse_sprite</span></a><span class="k2">(</span>somebitmap<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

and gfx_capabilities returns no HW_CURSOR and no SYSTEM_CURSOR, but still I got a mousepointer that is visible &quot;outside&quot; of the window in windowed mode when moved to the edges. Is this expected?</p><p>I mean - the full bitmap that is used as a mouse pointer is visible over the desktop when moved to the right and bottom edges even if a normal allegro bitmap would be cut and limited to the window.</p><p>I am on my Debian Etch using Allegro 4.2.1 (the version meant for testing that were uploaded on the mailinglist or if it was the forum a while ago).</p><p>Anyway - The main question is - Am I just &quot;lucky&quot; being on an X system, and this isn&#39;t reproducible on other platforms - I think I saw something like that mentioned concerning DirectX Fullscreen at least.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bhagabhi)</author>
		<pubDate>Thu, 07 Sep 2006 05:22:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi attach a screenshot; my mouse sprite doesn&#39;t go out of the window!</p><p>EDITED: Well I&#39;ve just seen that pic and of course mouse doesn&#39;t appear jaja but I ensure you it doesn&#39;t go out..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Maikol)</author>
		<pubDate>Fri, 08 Sep 2006 00:19:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Heh - Yeah - seems harder than one might think to get a screenshot of this... both Gnome-screenshot and Gimp seem to remove the Mouse before saving the image...</p><p>[Edit]</p><p>Self-made screenshot attached. -this is exactly what it looks like - but since there are troubles including the mouse in the screen-capture I made the effect by hand.</p><p>(the disk is the mouse pointer.)<br />[/Edit]
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bhagabhi)</author>
		<pubDate>Fri, 08 Sep 2006 01:12:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
gfx_capabilities returns no HW_CURSOR and no SYSTEM_CURSOR, but still I got a mousepointer that is visible &quot;outside&quot; of the window in windowed mode when moved to the edges. Is this expected?
</p></div></div><p>
When are you testing gfx_capabilities? The HW_CURSOR and SYSTEM_CURSOR flags are only set after you call show_mouse(). Anyway, if the cursor shows over the edge of the screen (as opposed to being clipped against the window edge), it is a hardware cursor.<br />Also check what the test program says about having or not having a hardware cursor.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Anyway - The main question is - Am I just &quot;lucky&quot; being on an X system, and this isn&#39;t reproducible on other platforms - I think I saw something like that mentioned concerning DirectX Fullscreen at least.
</p></div></div><p>
X11 always supports hardware cursors in both windowed mode and fullscreen mode if the proper X11 extensions are available, but they interfere with get_mouse_mickeys(), which wants to trap the physical cursor in the centre of the window to get an infinate range of mouse movement. So they are disabled by default.<br />Actually, I think DirectX fullscreen is the only platform that doesn&#39;t do hardware cursors at all.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 08 Sep 2006 01:47:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ah - Yeah, its my confusion that has gotten into play once again <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I thought that I should use the gfx_capabilities to make sure I <i>could</i> make use of a hardware cursor, when it actually represents if you are using it or not (by previously setting it using enable_hardware_cursor).</p><p>Anyway - Thanks Evert!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bhagabhi)</author>
		<pubDate>Fri, 08 Sep 2006 02:09:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I thought that I should use the gfx_capabilities to make sure I could make use of a hardware cursor, when it actually represents if you are using it or not
</p></div></div><p>
That&#39;s what one would normally expect, but unfortunately it can&#39;t reliably work that way: in Windows, for instance, you can only use hardware cursors under certain conditions (there are size restrictions) and you don&#39;t know if you can get a hardware cursor until you try.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Anyway - Thanks Evert!
</p></div></div><p>
You&#39;re welcome.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 08 Sep 2006 02:26:14 +0000</pubDate>
	</item>
</rss>
