From 5d0919fcff3ee3e321b1a0b2f1e4a7c6db97f9a8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 20 Mar 2022 12:11:57 +0100 Subject: handle layer popups --- src/helpers/WLClasses.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/helpers/WLClasses.hpp') diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index b92d0071..6aef68d1 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -12,6 +12,7 @@ struct SLayerSurface { DYNLISTENER(mapLayerSurface); DYNLISTENER(unmapLayerSurface); DYNLISTENER(commitLayerSurface); + DYNLISTENER(newPopup); wlr_box geometry; zwlr_layer_shell_v1_layer layer; @@ -43,4 +44,21 @@ struct SKeyboard { bool operator==(const SKeyboard& rhs) { return keyboard == rhs.keyboard; } +}; + +struct SLayerPopup { + wlr_xdg_popup* popup = nullptr; + SLayerSurface* parentSurface = nullptr; + wlr_xdg_popup* parentPopup = nullptr; + + DYNLISTENER(mapPopup); + DYNLISTENER(destroyPopup); + DYNLISTENER(unmapPopup); + DYNLISTENER(commitPopup); + DYNLISTENER(newPopupFromPopup); + + // For the list lookup + bool operator==(const SLayerPopup& rhs) { + return popup == rhs.popup; + } }; \ No newline at end of file -- cgit v1.2.3