More cleaning

This commit is contained in:
James Grogan 2022-11-11 11:48:42 +00:00
parent 02ebb9a54b
commit 6adc441e6f
37 changed files with 213 additions and 181 deletions

View file

@ -1,9 +1,8 @@
#include "DesktopManager.h"
#include "XcbInterface.h"
#include "TestCase.h"
#include "TestCaseRunner.h"
#include "GuiApplication.h"
#include <memory>
#include <string>
#include <iostream>
@ -13,18 +12,11 @@ class TestOpenGlRendering : public TestCase
public:
bool Run() override
{
auto desktopManager = DesktopManager::Create();
auto app = std::make_unique<GuiApplication>();
auto mainWindow = desktopManager->GetWindowManager()->GetMainWindow();
mainWindow->SetSize(800, 600);
XcbInterface window_interface(desktopManager.get());
window_interface.setUseHardwareRendering(true);
window_interface.initialize();
window_interface.addWindow(mainWindow);
window_interface.showWindow(mainWindow);
window_interface.loop();
window_interface.shutDown();
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11);
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app->run();
return true;
}

View file

@ -3,27 +3,18 @@
#include "Window.h"
#include "FileLogger.h"
#include "DesktopManager.h"
#include "GuiApplication.h"
int main()
{
FileLogger::GetInstance().Open();
auto desktop_manager = DesktopManager::Create();
auto app = std::make_unique<GuiApplication>();
auto window = desktop_manager->GetWindowManager()->GetMainWindow();
window->SetSize(800, 600);
//app->setUiInterfaceBackend(UiInterfaceFactory::Backend::WAYLAND);
app->setUiInterfaceBackend(UiInterfaceFactory::Backend::WAYLAND_RASTER);
WaylandInterface window_interface(desktop_manager.get());
window_interface.setUseHardwareRendering(true);
window_interface.initialize();
app->run();
window_interface.addWindow(window);
window_interface.showWindow(window);
window_interface.loop();
window_interface.shutDown();
return 0;
}