mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
rework popups completely
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "../defines.hpp"
|
||||
#include "../../wlr-layer-shell-unstable-v1-protocol.h"
|
||||
#include "../Window.hpp"
|
||||
#include "SubsurfaceTree.hpp"
|
||||
|
||||
struct SLayerSurface {
|
||||
wlr_layer_surface_v1* layerSurface;
|
||||
@@ -14,9 +15,9 @@ struct SLayerSurface {
|
||||
DYNLISTENER(unmapLayerSurface);
|
||||
DYNLISTENER(commitLayerSurface);
|
||||
DYNLISTENER(newPopup);
|
||||
DYNLISTENER(newSubsurface);
|
||||
|
||||
wlr_box geometry;
|
||||
Vector2D position;
|
||||
zwlr_layer_shell_v1_layer layer;
|
||||
|
||||
int monitorID = -1;
|
||||
@@ -28,22 +29,6 @@ struct SLayerSurface {
|
||||
}
|
||||
};
|
||||
|
||||
struct SSubsurface {
|
||||
wlr_subsurface* subsurface = nullptr;
|
||||
SLayerSurface* pParentSurface = nullptr;
|
||||
|
||||
DYNLISTENER(mapSubsurface);
|
||||
DYNLISTENER(unmapSubsurface);
|
||||
DYNLISTENER(destroySubsurface);
|
||||
DYNLISTENER(commitSubsurface);
|
||||
DYNLISTENER(newSubsurface);
|
||||
|
||||
// For the list lookup
|
||||
bool operator==(const SSubsurface& rhs) {
|
||||
return subsurface == rhs.subsurface && pParentSurface == rhs.pParentSurface;
|
||||
}
|
||||
};
|
||||
|
||||
struct SRenderData {
|
||||
wlr_output* output;
|
||||
timespec* when;
|
||||
@@ -68,26 +53,9 @@ struct SKeyboard {
|
||||
}
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
struct SXDGPopup {
|
||||
CWindow* parentWindow = nullptr;
|
||||
wlr_xdg_popup* parentPopup = nullptr;
|
||||
SXDGPopup* parentPopup = nullptr;
|
||||
wlr_xdg_popup* popup = nullptr;
|
||||
|
||||
DYNLISTENER(newPopupFromPopupXDG);
|
||||
@@ -95,6 +63,11 @@ struct SXDGPopup {
|
||||
DYNLISTENER(mapPopupXDG);
|
||||
DYNLISTENER(unmapPopupXDG);
|
||||
|
||||
double* lx;
|
||||
double* ly;
|
||||
|
||||
SSurfaceTreeNode* pSurfaceTree = nullptr;
|
||||
|
||||
// For the list lookup
|
||||
bool operator==(const SXDGPopup& rhs) {
|
||||
return popup == rhs.popup;
|
||||
|
Reference in New Issue
Block a user