Skip to content

Commit

Permalink
Window: add destroy signal
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Apr 21, 2024
1 parent e69bc5b commit 2343238
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/desktop/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CWindow::~CWindow() {
g_pCompositor->m_pLastWindow = nullptr;
}

events.destroy.emit();

if (!g_pHyprOpenGL)
return;

Expand Down
5 changes: 5 additions & 0 deletions src/desktop/Window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../macros.hpp"
#include "../managers/XWaylandManager.hpp"
#include "DesktopTypes.hpp"
#include "../helpers/signal/Signal.hpp"

enum eIdleInhibitMode {
IDLEINHIBIT_NONE = 0,
Expand Down Expand Up @@ -216,6 +217,10 @@ class CWindow {

CWLSurface m_pWLSurface;

struct {
CSignal destroy;
} events;

union {
wlr_xdg_surface* xdg;
wlr_xwayland_surface* xwayland;
Expand Down

0 comments on commit 2343238

Please sign in to comment.