X11 fullscreen fix

This commit is contained in:
James Turk 2005-08-10 05:36:58 +00:00
parent 8cbebab31e
commit abc2c2bad5
2 changed files with 47 additions and 44 deletions

View File

@ -1,40 +1,40 @@
#ifndef PHOTON_HPP #ifndef PHOTON_HPP
#define PHOTON_HPP #define PHOTON_HPP
#include "Application.hpp" #include "Kernel.hpp"
#include "entrypoint.hpp" #include "types.hpp"
#include "exceptions.hpp" #include "State.hpp"
#include "InputListener.hpp" #include "Application.hpp"
#include "Kernel.hpp" #include "Task.hpp"
#include "Log.hpp" #include "exceptions.hpp"
#include "LogSink.hpp" #include "photon.hpp"
#include "photon.hpp" #include "InputListener.hpp"
#include "ResourceManaged.hpp" #include "entrypoint.hpp"
#include "ResourceManager.hpp" #include "LogSink.hpp"
#include "State.hpp" #include "Log.hpp"
#include "Task.hpp" #include "ResourceManaged.hpp"
#include "types.hpp" #include "ResourceManager.hpp"
#include "audio/AudioCore.hpp" #include "audio/SampleResourceManager.hpp"
#include "audio/SampleResourceManager.hpp" #include "audio/Source.hpp"
#include "audio/Source.hpp" #include "audio/AudioCore.hpp"
#include "math/Circle.hpp" #include "math/math.hpp"
#include "math/math.hpp" #include "math/Rect.hpp"
#include "math/Rect.hpp" #include "math/Vector2.hpp"
#include "math/Vector2.hpp" #include "math/Circle.hpp"
#include "util/ConfigFile.hpp" #include "util/ConfigFile.hpp"
#include "util/FileBuffer.hpp" #include "util/VersionInfo.hpp"
#include "util/RandGen.hpp" #include "util/Singleton.hpp"
#include "util/Singleton.hpp" #include "util/RandGen.hpp"
#include "util/Timer.hpp" #include "util/Timer.hpp"
#include "util/VersionInfo.hpp" #include "util/FileBuffer.hpp"
#include "util/filesys/filesys.hpp" #include "util/filesys/filesys.hpp"
#include "video/Color.hpp" #include "video/Pen.hpp"
#include "video/Font.hpp" #include "video/Image.hpp"
#include "video/FontResourceManager.hpp" #include "video/FontResourceManager.hpp"
#include "video/Image.hpp" #include "video/Texture.hpp"
#include "video/Pen.hpp" #include "video/Color.hpp"
#include "video/Texture.hpp" #include "video/TextureResourceManager.hpp"
#include "video/TextureResourceManager.hpp" #include "video/VideoCore.hpp"
#include "video/VideoCore.hpp" #include "video/Font.hpp"
#endif // PHOTON_HPP #endif // PHOTON_HPP

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu) // James Turk (jpt2433@rit.edu)
// //
// Version: // Version:
// $Id: Application.cpp,v 1.20 2005/08/08 21:39:41 cozman Exp $ // $Id: Application.cpp,v 1.21 2005/08/10 05:36:58 cozman Exp $
#include "Application.hpp" #include "Application.hpp"
@ -22,7 +22,6 @@
#include "audio/AudioCore.hpp" #include "audio/AudioCore.hpp"
#include "util/filesys/filesys.hpp" #include "util/filesys/filesys.hpp"
namespace photon namespace photon
{ {
@ -82,13 +81,16 @@ void Application::createDisplay(uint width, uint height,
{ {
throw APIError("Failed to create display."); throw APIError("Failed to create display.");
} }
displayWidth_ = width;
displayHeight_ = height; // fetch window size (fixes X11 fullscreen bug)
glfwGetWindowSize(reinterpret_cast<int*>(&displayWidth_),
reinterpret_cast<int*>(&displayHeight_));
glfwSetWindowTitle(title.c_str()); // title is set separately glfwSetWindowTitle(title.c_str()); // title is set separately
initOpenGL(); initOpenGL();
setOrthoView(); setOrthoView();
Kernel::getInstance().addTask(TaskPtr(new VideoTask())); Kernel::getInstance().addTask(TaskPtr(new VideoTask()));
// register the callbacks (after a window is open) // register the callbacks (after a window is open)
@ -127,6 +129,7 @@ void Application::createDisplay(uint width, uint height, uint bpp,
"8,16,24, or 32, passed " + "8,16,24, or 32, passed " +
boost::lexical_cast<std::string>(bpp) ); boost::lexical_cast<std::string>(bpp) );
} }
} }
void Application::setTitle(const std::string& title) void Application::setTitle(const std::string& title)