<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Fullscreen window on OS X not visible</title>
		<link>http://www.allegro.cc/forums/view/615982</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 14 Jan 2016 23:09:20 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When I run the following on OS X with Allegro 5.0.11, I can&#39;t see any window - yet the process appears in the dock and the menu bar (see attached). I can still successfully quit it using the escape key, as expected.</p><p>If I remove <span class="source-code"><a href="http://www.allegro.cc/manual/al_set_new_display_flags"><span class="a">al_set_new_display_flags</span></a><span class="k2">(</span>ALLEGRO_FULLSCREEN<span class="k2">)</span><span class="k2">;</span></span>, I get a solid black window, again as expected.</p><p>My native resolution is 1440x900.</p><p>Any ideas?</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#include &lt;allegro5/allegro5.h&gt;</span>
<span class="number">  2</span><span class="p">#include &lt;stdio.h&gt;</span>
<span class="number">  3</span><span class="p">#include &lt;stdlib.h&gt;</span>
<span class="number">  4</span>
<span class="number">  5</span><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span>
<span class="number">  6</span><span class="k2">{</span>
<span class="number">  7</span>  <a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a> <span class="k3">*</span>d<span class="k2">;</span>
<span class="number">  8</span>  <a href="http://www.allegro.cc/manual/ALLEGRO_EVENT_QUEUE"><span class="a">ALLEGRO_EVENT_QUEUE</span></a> <span class="k3">*</span>q<span class="k2">;</span>
<span class="number">  9</span>  <a href="http://www.allegro.cc/manual/ALLEGRO_EVENT"><span class="a">ALLEGRO_EVENT</span></a> e<span class="k2">;</span>
<span class="number"> 10</span>  <span class="k1">bool</span> done <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 11</span>
<span class="number"> 12</span>  <a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 13</span>  <a href="http://www.allegro.cc/manual/al_install_keyboard"><span class="a">al_install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>
<span class="number"> 15</span>  <a href="http://www.allegro.cc/manual/al_set_new_display_flags"><span class="a">al_set_new_display_flags</span></a><span class="k2">(</span>ALLEGRO_FULLSCREEN<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span>  d <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span><span class="n">1440</span>, <span class="n">900</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 17</span>
<span class="number"> 18</span>  q <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_event_queue"><span class="a">al_create_event_queue</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 19</span>  <a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span>q, <a href="http://www.allegro.cc/manual/al_get_keyboard_event_source"><span class="a">al_get_keyboard_event_source</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 20</span>
<span class="number"> 21</span>  <a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 22</span>
<span class="number"> 23</span>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span>done<span class="k2">)</span>
<span class="number"> 24</span>  <span class="k2">{</span>
<span class="number"> 25</span>    <a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span>q, <span class="k3">&amp;</span>e<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 26</span>
<span class="number"> 27</span>    <span class="k1">if</span><span class="k2">(</span>e.type <span class="k3">=</span><span class="k3">=</span> ALLEGRO_EVENT_KEY_DOWN<span class="k2">)</span>
<span class="number"> 28</span>    <span class="k2">{</span>
<span class="number"> 29</span>      <span class="k1">if</span><span class="k2">(</span>e.keyboard.keycode <span class="k3">=</span><span class="k3">=</span> ALLEGRO_KEY_ESCAPE<span class="k2">)</span>
<span class="number"> 30</span>        done <span class="k3">=</span> <span class="k1">true</span><span class="k2">;</span>
<span class="number"> 31</span>    <span class="k2">}</span>
<span class="number"> 32</span>  <span class="k2">}</span>
<span class="number"> 33</span>
<span class="number"> 34</span>
<span class="number"> 35</span>  <a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span>d<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 36</span>  <a href="http://www.allegro.cc/manual/al_destroy_event_queue"><span class="a">al_destroy_event_queue</span></a><span class="k2">(</span>q<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 37</span>
<span class="number"> 38</span>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 39</span><span class="k2">}</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dthompson)</author>
		<pubDate>Mon, 11 Jan 2016 23:40:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try ALLEGRO_FULLSCREEN_WINDOW - the normal FULLSCREEN did not work with 5.0.11.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Tue, 12 Jan 2016 03:50:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Huh, works like a charm! Thanks very much. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Do you know whether this is isolated to OS X?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dthompson)</author>
		<pubDate>Tue, 12 Jan 2016 17:03:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The normal FULLSCREEN works on Linux and Windows with 5.0.11, so yes, it seems to be OS X related.</p><p>But I started to use FULLSCREEN_WINDOW everywhere too now, it works better in most situations.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amarillion)</author>
		<pubDate>Tue, 12 Jan 2016 19:18:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The original OS X fullscreen used low-level calls to capture the screen entirely, and change the horizontal/vertical resolution. This was fine and appropriate for CRTs but doesn&#39;t really work for LCD panels so it was &#39;emulated&#39; by the OS. That method has been deprecated since at least 10.6 and I suppose now Apple have got round to disabling it entirely. The current advice from Apple is to do a fullscreen window, and if you want a resolution that&#39;s not native, draw to a back-buffer and upscale it. I think Allegro 5 does this for you automatically (not certain though)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Tue, 12 Jan 2016 19:33:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Maybe in that case FULLSCREEN should simply do the same thing as FULLSCREEN_WINDOW on a mac? </p><p>There is still some situations where people might prefer FULLSCREEN, and it would be good if that code worked on a mac too even if it&#39;s simulated.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (amarillion)</author>
		<pubDate>Tue, 12 Jan 2016 19:46:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, not sure that&#39;s a good idea.  FULLSCREEN_WINDOW implies scaling (and usually, bilinear filtering) if the requested res doesn&#39;t match the native one; users requesting FULLSCREEN probably won&#39;t expect that.</p><p>Better would be to simply fail creating the display, allowing the user to fall back on FULLSCREEN_WINDOW if that&#39;s suitable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Pascoe)</author>
		<pubDate>Thu, 14 Jan 2016 06:11:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>On this subject - in the past I&#39;ve wondered whether it&#39;d be useful for Allegro to include something along the lines of a <span class="source-code">FULLSCREEN_WINDOW_LETTERBOX</span> mode, which  would scale up the requested display resolution to the highest multiple that would fit within the fullscreen dimensions, and then use nearest-neighbour.</p><p>Would be useful for games with few pixels - but might be too high-level. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dthompson)</author>
		<pubDate>Thu, 14 Jan 2016 16:38:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve often wished for a letterbox/pillarbox mode myself--currently FULLSCREEN_WINDOW will always stretch the picture to use the full screen, completely ignoring the aspect ratio of the original image.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bruce Pascoe)</author>
		<pubDate>Thu, 14 Jan 2016 21:33:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Any chance there&#39;d be room for this in 5.2?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (dthompson)</author>
		<pubDate>Thu, 14 Jan 2016 23:09:20 +0000</pubDate>
	</item>
</rss>
