<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Fullscreen on other than main screen?</title>
		<link>http://www.allegro.cc/forums/view/617422</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 02 Jun 2018 01:20:28 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello guys,<br />is it somehow possible to create a fullscreen window on a screen other than the main one? Looking at the docs I see nothing of the sort...</p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (APrince)</author>
		<pubDate>Sat, 26 May 2018 23:39:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="https://liballeg.org/a5docs/trunk/monitor.html#al_set_new_display_adapter">al_set_new_display_adapter</a></p><p>Does that work for you? I can&#39;t test it atm.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 27 May 2018 23:39:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, okay. It will be easier if I describe what I want to achieve...</p><p>I have a window with my application and on it there is a &quot;fullscreen button&quot;. And I want this button to make the window a fullscreen window on the monitor it is currently on... The function you linked seems to &quot;link&quot; only new windows and not existing ones. Currently it always gets maximized on the main screen.</p><p>I imagine I could delete the window and recreate it, but I am not sure if that&#39;s not too complicated (if only I knew this at the beginning...) - I have the pointer distributed all over the app (not a good approach, I know...).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (APrince)</author>
		<pubDate>Mon, 28 May 2018 00:39:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It should maximize on the monitor it was created on. Don&#39;t think allegro lets you change the adapter in use without recreating your display.</p><p>If you have a global pointer in use, just use a reference to change it directly. Then all your other references can just see the change normally.</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include &lt;cassert&gt;</span>

<a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span> ChangeRes<span class="k2">(</span><a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span><span class="k3">*</span> pdisplay , <span class="k1">bool</span> fs , <span class="k1">int</span> adapter , <span class="k1">int</span> ww , <span class="k1">int</span> wh<span class="k2">)</span> <span class="k2">{</span>
   <a href="http://www.delorie.com/djgpp/doc/libc/libc_48.html" target="_blank">assert</a><span class="k2">(</span>pdisplay<span class="k2">)</span><span class="k2">;</span>
   <span class="k1">if</span> <span class="k2">(</span><span class="k3">*</span>pdisplay<span class="k2">)</span> <span class="k2">{</span><a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span><span class="k3">*</span>pdisplay<span class="k2">)</span><span class="k2">;</span><span class="k2">}</span>
   <a href="http://www.allegro.cc/manual/al_set_new_display_adapter"><span class="a">al_set_new_display_adapter</span></a><span class="k2">(</span>adapter<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/al_set_new_display_option"><span class="a">al_set_new_display_option</span></a><span class="k2">(</span>fs?ALLEGRO_FULLSCREEN_WINDOW:ALLEGRO_WINDOWED <span class="k3">|</span> ALLEGRO_OPENGL<span class="k2">)</span><span class="k2">;</span>
   <span class="k3">*</span>pdisplay <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>ww , wh<span class="k2">)</span><span class="k2">;</span>
   <span class="k1">return</span> <span class="k3">*</span>pdisplay<span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include "allegro5/allegro.h"</span>

<span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc , <span class="k1">char</span><span class="k3">*</span><span class="k3">*</span> argv<span class="k2">)</span> <span class="k2">{</span>
   <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</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="k2">{</span><span class="k1">return</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span><span class="k2">}</span>
   <a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span> display <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
   <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span>ChangeRes<span class="k2">(</span><span class="k3">&amp;</span>display , <span class="k1">true</span> , <span class="n">0</span> , <span class="n">800</span> , <span class="n">600</span><span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span><span class="k1">return</span> <span class="k3">-</span><span class="n">2</span><span class="k2">;</span><span class="k2">}</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>
   <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/al_rest"><span class="a">al_rest</span></a><span class="k2">(</span><span class="n">3</span>.<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

Something else you can do is monitor the window position and the monitor areas. You can easily detect when a window overlaps with a monitor, and then choose that monitor (adapter) for your new fullscreen window.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 28 May 2018 01:01:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well I know on which monitor the window is but I was asking if I can do this without recreating the display. That&#39;s a tricky part... I don&#39;t know whether this issue was fixed in any of the releases I missed, but I use 5.0.9 and there is this issue with antialiased windows that has been there for ages and I don&#39;t think anyone fixed it...</p><p>When I create start the application (Windows) with AA flags set, it tries some combinations of AA settings which makes the window flicker for a few seconds. This is annoying but, but I somehow get along with it. But recreating the windows just switch it to fullscreen and thus seeing this again... Well, I don&#39;t like it.</p><p>But thinking about it... I don&#39;t use the real fullscreen window, but rather the fake one (ALLEGRO_FULLSCREEN_WINDOW). Wouldn&#39;t it be possible to set this one without recreating the display? I mean, it&#39;s still a window, only the size, position and style (the borders) change...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (APrince)</author>
		<pubDate>Thu, 31 May 2018 19:52:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro doesn&#39;t support toggling fullscreen between monitors, only on the one it was created on. You either have to recreate the window, or use an ALLEGRO_FRAMELESS | ALLEGRO_WINDOWED driver. You can then resize and position the window at will.</p><p>5.0.9 is older than dirt. Upgrade.</p><p>EDIT<br />You&#39;ll have to toggle the window attribute, for WS_EX_TOPMOST or whatever it is, to cover the taskbar.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 01 Jun 2018 01:24:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, thanks for the tips... I&#39;ll see what I can do.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (APrince)</author>
		<pubDate>Sat, 02 Jun 2018 01:15:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you get it working, you can always submit a patch to allegro.</p><p>Make sure to post your progress, I want to see how it goes. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 02 Jun 2018 01:20:28 +0000</pubDate>
	</item>
</rss>
