popups handled properly

This commit is contained in:
vaxerski
2022-03-20 14:00:46 +01:00
parent 332fa8a802
commit decb2f638d
6 changed files with 100 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include "../events/Events.hpp"
#include "../defines.hpp"
#include "../../wlr-layer-shell-unstable-v1-protocol.h"
#include "../Window.hpp"
struct SLayerSurface {
wlr_layer_surface_v1* layerSurface;
@@ -61,4 +62,20 @@ struct SLayerPopup {
bool operator==(const SLayerPopup& rhs) {
return popup == rhs.popup;
}
};
struct SXDGPopup {
CWindow* parentWindow = nullptr;
wlr_xdg_popup* parentPopup = nullptr;
wlr_xdg_popup* popup = nullptr;
DYNLISTENER(newPopupFromPopupXDG);
DYNLISTENER(destroyPopupXDG);
DYNLISTENER(mapPopupXDG);
DYNLISTENER(unmapPopupXDG);
// For the list lookup
bool operator==(const SXDGPopup& rhs) {
return popup == rhs.popup;
}
};