diff --git a/src/WallpaperEngine/Input/Drivers/CGLFWMouseInput.cpp b/src/WallpaperEngine/Input/Drivers/CGLFWMouseInput.cpp index ce96911..5450d1c 100644 --- a/src/WallpaperEngine/Input/Drivers/CGLFWMouseInput.cpp +++ b/src/WallpaperEngine/Input/Drivers/CGLFWMouseInput.cpp @@ -8,6 +8,8 @@ using namespace WallpaperEngine::Input::Drivers; CGLFWMouseInput::CGLFWMouseInput (Render::Drivers::CGLFWOpenGLDriver* driver) : m_reportedPosition (), m_mousePosition (), + m_leftClick (MouseClickStatus::Released), + m_rightClick (MouseClickStatus::Released), m_driver (driver) {} void CGLFWMouseInput::update () { diff --git a/src/WallpaperEngine/Render/Drivers/CVideoDriver.cpp b/src/WallpaperEngine/Render/Drivers/CVideoDriver.cpp index fb8c98a..278ba27 100644 --- a/src/WallpaperEngine/Render/Drivers/CVideoDriver.cpp +++ b/src/WallpaperEngine/Render/Drivers/CVideoDriver.cpp @@ -4,8 +4,6 @@ using namespace WallpaperEngine::Render::Drivers; CVideoDriver::CVideoDriver (CWallpaperApplication& app) : m_app (app) {} -CVideoDriver::~CVideoDriver () {} - CWallpaperApplication& CVideoDriver::getApp () const { return this->m_app; } \ No newline at end of file diff --git a/src/WallpaperEngine/Render/Drivers/CVideoDriver.h b/src/WallpaperEngine/Render/Drivers/CVideoDriver.h index d945331..93b6365 100644 --- a/src/WallpaperEngine/Render/Drivers/CVideoDriver.h +++ b/src/WallpaperEngine/Render/Drivers/CVideoDriver.h @@ -17,7 +17,7 @@ class CFullScreenDetector; class CVideoDriver { public: explicit CVideoDriver (CWallpaperApplication& app); - virtual ~CVideoDriver (); + virtual ~CVideoDriver () = default; /** * @return The current output in use diff --git a/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp b/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp index 9aa759d..a54a0d3 100644 --- a/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp +++ b/src/WallpaperEngine/Render/Drivers/Detectors/CX11FullScreenDetector.cpp @@ -31,6 +31,8 @@ int CustomXIOErrorHandler (Display* dsp) { CX11FullScreenDetector::CX11FullScreenDetector (Application::CApplicationContext& appContext, CGLFWOpenGLDriver& driver) : CFullScreenDetector (appContext), + m_display (nullptr), + m_root (0), m_driver (driver) { // do not use previous handler, it might stop the app under weird circumstances // these handlers might be replaced by other X11-specific functionality, they @@ -67,7 +69,7 @@ bool CX11FullScreenDetector::anythingFullscreen () const { Window root, *schildren = nullptr; unsigned int num_children; - if (!XQueryTree (m_display, ourWindow, &root, &parentWindow, &schildren, &num_children)) + if (!XQueryTree (this->m_display, ourWindow, &root, &parentWindow, &schildren, &num_children)) return false; if (schildren) diff --git a/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.cpp b/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.cpp index 52f216f..5040118 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.cpp +++ b/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.cpp @@ -8,5 +8,3 @@ COutputViewport::COutputViewport (glm::ivec4 viewport, std::string name, bool si viewport (viewport), name (std::move (name)), single (single) {} - -COutputViewport::~COutputViewport () {} \ No newline at end of file diff --git a/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.h b/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.h index be21f74..ec11d34 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.h +++ b/src/WallpaperEngine/Render/Drivers/Output/COutputViewport.h @@ -7,7 +7,7 @@ namespace WallpaperEngine::Render::Drivers::Output { class COutputViewport { public: COutputViewport (glm::ivec4 viewport, std::string name, bool single = false); - virtual ~COutputViewport (); + virtual ~COutputViewport () = default; glm::ivec4 viewport; std::string name; diff --git a/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.cpp b/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.cpp index 0a32196..596a8e9 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.cpp +++ b/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.cpp @@ -10,8 +10,6 @@ CWaylandOutput::CWaylandOutput (CApplicationContext& context, CWaylandOpenGLDriv updateViewports (); } -CWaylandOutput::~CWaylandOutput () {} - void CWaylandOutput::updateViewports () { m_viewports.clear (); const auto PDRIVER = dynamic_cast (&m_driver); diff --git a/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.h b/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.h index 22398b3..fc6f44f 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.h +++ b/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutput.h @@ -16,7 +16,7 @@ namespace Output { class CWaylandOutput final : public COutput { public: CWaylandOutput (CApplicationContext& context, CWaylandOpenGLDriver& driver); - ~CWaylandOutput () override; + ~CWaylandOutput () override = default; void reset () override; diff --git a/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutputViewport.cpp b/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutputViewport.cpp index 91fed4d..9596342 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutputViewport.cpp +++ b/src/WallpaperEngine/Render/Drivers/Output/CWaylandOutputViewport.cpp @@ -106,12 +106,11 @@ constexpr struct zwlr_layer_surface_v1_listener layerSurfaceListener = { CWaylandOutputViewport::CWaylandOutputViewport (CWaylandOpenGLDriver* driver, uint32_t waylandName, struct wl_registry* registry) : m_driver (driver), + size ({0, 0}), waylandName (waylandName), COutputViewport ({0, 0, 0, 0}, "", true) { // setup output listener this->output = static_cast (wl_registry_bind (registry, waylandName, &wl_output_interface, 4)); - this->name = ""; - this->size = {0, 0}; wl_output_add_listener (output, &outputListener, this); } diff --git a/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp b/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp index 845d0b1..c84515f 100644 --- a/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp +++ b/src/WallpaperEngine/Render/Drivers/Output/CX11Output.cpp @@ -30,7 +30,14 @@ int CustomXIOErrorHandler (Display* dsp) { return 0; } -CX11Output::CX11Output (CApplicationContext& context, CVideoDriver& driver) : COutput (context, driver) { +CX11Output::CX11Output (CApplicationContext& context, CVideoDriver& driver) : COutput (context, driver), + m_display (nullptr), + m_pixmap (None), + m_root (None), + m_gc (None), + m_imageData (nullptr), + m_imageSize (0), + m_image (nullptr) { // do not use previous handler, it might stop the app under weird circumstances XSetErrorHandler (CustomXErrorHandler); XSetIOErrorHandler (CustomXIOErrorHandler); @@ -88,9 +95,6 @@ uint32_t CX11Output::getImageBufferSize () const { } void CX11Output::loadScreenInfo () { - // reset the viewports - this->m_viewports.clear (); - this->m_display = XOpenDisplay (nullptr); // set the error handling to try and recover from X disconnections #ifdef HAVE_XSETIOERROREXITHANDLER diff --git a/src/WallpaperEngine/Render/Objects/CImage.cpp b/src/WallpaperEngine/Render/Objects/CImage.cpp index 4ab155b..ee10d4e 100644 --- a/src/WallpaperEngine/Render/Objects/CImage.cpp +++ b/src/WallpaperEngine/Render/Objects/CImage.cpp @@ -23,6 +23,8 @@ CImage::CImage (CScene* scene, Core::Objects::CImage* image) : m_modelViewProjectionCopyInverse (), m_modelViewProjectionPass (glm::mat4 (1.0)), m_modelViewProjectionPassInverse (glm::inverse (m_modelViewProjectionPass)), + m_modelMatrix(), + m_viewProjectionMatrix(), m_pos () { auto projection = this->getScene ()->getScene ()->getOrthogonalProjection (); diff --git a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.cpp b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.cpp index 117c753..56ca4ad 100644 --- a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.cpp +++ b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.cpp @@ -9,11 +9,11 @@ CShaderVariableInteger::CShaderVariableInteger (int32_t defaultValue) : m_value (0), CShaderVariable (&this->m_defaultValue, nullptr, Type) {} -CShaderVariableInteger::CShaderVariableInteger (int32_t defaultValue, std::string name) : +CShaderVariableInteger::CShaderVariableInteger (int32_t defaultValue, const std::string& name) : m_defaultValue (defaultValue), m_value (0), CShaderVariable (&this->m_defaultValue, nullptr, Type) { - this->setName (std::move (name)); + this->setName (name); } void CShaderVariableInteger::setValue (int32_t value) { diff --git a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.h b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.h index 1011d92..8e0800e 100644 --- a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.h +++ b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableInteger.h @@ -6,7 +6,7 @@ namespace WallpaperEngine::Render::Shaders::Variables { class CShaderVariableInteger final : public CShaderVariable { public: explicit CShaderVariableInteger (int32_t defaultValue); - CShaderVariableInteger (int32_t defaultValue, std::string name); + CShaderVariableInteger (int32_t defaultValue, const std::string& name); const int getSize () const override; diff --git a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.cpp b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.cpp index 4e89c22..eae7fc2 100644 --- a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.cpp +++ b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.cpp @@ -9,11 +9,11 @@ CShaderVariableVector2::CShaderVariableVector2 (const glm::vec2& defaultValue) : m_value (glm::vec2 ()), CShaderVariable (&this->m_defaultValue, nullptr, Type) {} -CShaderVariableVector2::CShaderVariableVector2 (const glm::vec2& defaultValue, std::string name) : +CShaderVariableVector2::CShaderVariableVector2 (const glm::vec2& defaultValue, const std::string& name) : m_defaultValue (defaultValue), m_value (glm::vec2 ()), CShaderVariable (&this->m_defaultValue, nullptr, Type) { - this->setName (std::move (name)); + this->setName (name); } void CShaderVariableVector2::setValue (const glm::vec2& value) { diff --git a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.h b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.h index a992728..6fe093c 100644 --- a/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.h +++ b/src/WallpaperEngine/Render/Shaders/Variables/CShaderVariableVector2.h @@ -7,7 +7,7 @@ namespace WallpaperEngine::Render::Shaders::Variables { class CShaderVariableVector2 final : public CShaderVariable { public: explicit CShaderVariableVector2 (const glm::vec2& defaultValue); - CShaderVariableVector2 (const glm::vec2& defaultValue, std::string name); + CShaderVariableVector2 (const glm::vec2& defaultValue, const std::string& name); const int getSize () const override; diff --git a/src/WallpaperEngine/Render/Wallpapers/CWeb.cpp b/src/WallpaperEngine/Render/Wallpapers/CWeb.cpp index f1790e2..a7c751d 100644 --- a/src/WallpaperEngine/Render/Wallpapers/CWeb.cpp +++ b/src/WallpaperEngine/Render/Wallpapers/CWeb.cpp @@ -13,6 +13,10 @@ CWeb::CWeb (Core::CWeb* web, CRenderContext& context, CAudioContext& audioContex m_height (16), m_browserContext (browserContext), m_browser (), + m_leftClick (WallpaperEngine::Input::MouseClickStatus::Released), + m_rightClick (WallpaperEngine::Input::MouseClickStatus::Released), + m_mousePosition(), + m_mousePositionLast(), m_client () { this->m_browserContext.markAsUsed (); // setup framebuffers