hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.88k stars 752 forks source link

add virtual destructor to surfacerole to avoid undefined behaviour #6620

Closed gulafaran closed 1 week ago

gulafaran commented 1 week ago

all classes that will be derived from should have a virtual destructor otherwise deleting an instance via pointer to a base class is undefined behaviour, CLayerShellResource/CXDGSurfaceResource hits this with std::default_delete in the new sharedptr implentation.

gulafaran commented 1 week ago

also added a commit to fix missing includes for no precompiled headers builds and removed a redefinition of HYPRATOMS that already is defined in macros.hpp in the second commit,