From addd3e7f1aeb670dd91d26005aaeccce3efb1ae7 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 May 2024 22:43:51 +0200 Subject: xwayland: move to hyprland impl (#6086) --- src/desktop/Window.hpp | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) (limited to 'src/desktop/Window.hpp') diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp index 24d9562b..473ce361 100644 --- a/src/desktop/Window.hpp +++ b/src/desktop/Window.hpp @@ -15,6 +15,7 @@ #include "../helpers/signal/Signal.hpp" class CXDGSurfaceResource; +class CXWaylandSurface; enum eIdleInhibitMode { IDLEINHIBIT_NONE = 0, @@ -199,48 +200,23 @@ struct SInitialWorkspaceToken { class CWindow { public: static PHLWINDOW create(SP); - // xwl - static PHLWINDOW create(); + static PHLWINDOW create(SP); private: CWindow(SP resource); - CWindow(); + CWindow(SP surface); public: ~CWindow(); - DYNLISTENER(commitWindow); - DYNLISTENER(mapWindow); - DYNLISTENER(unmapWindow); - DYNLISTENER(destroyWindow); - DYNLISTENER(setTitleWindow); - DYNLISTENER(setGeometryX11U); - DYNLISTENER(fullscreenWindow); - DYNLISTENER(requestMove); - DYNLISTENER(requestMinimize); - DYNLISTENER(requestMaximize); - DYNLISTENER(requestResize); - DYNLISTENER(activateX11); - DYNLISTENER(configureX11); - DYNLISTENER(toplevelClose); - DYNLISTENER(toplevelActivate); - DYNLISTENER(toplevelFullscreen); - DYNLISTENER(setOverrideRedirect); - DYNLISTENER(associateX11); - DYNLISTENER(dissociateX11); - DYNLISTENER(ackConfigure); - // DYNLISTENER(newSubsurfaceWindow); - CWLSurface m_pWLSurface; struct { CSignal destroy; } events; - union { - wlr_xwayland_surface* xwayland; - } m_uSurface; WP m_pXDGSurface; + WP m_pXWaylandSurface; // this is the position and size of the "bounding box" Vector2D m_vPosition = Vector2D(0, 0); @@ -391,7 +367,7 @@ class CWindow { // For the list lookup bool operator==(const CWindow& rhs) { - return m_pXDGSurface == rhs.m_pXDGSurface && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize && + return m_pXDGSurface == rhs.m_pXDGSurface && m_pXWaylandSurface == rhs.m_pXWaylandSurface && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize && m_bFadingOut == rhs.m_bFadingOut; } @@ -459,6 +435,8 @@ class CWindow { void onWorkspaceAnimUpdate(); void onUpdateState(); void onUpdateMeta(); + void onX11Configure(CBox box); + void onResourceChangeX11(); std::string fetchTitle(); std::string fetchClass(); @@ -478,8 +456,12 @@ class CWindow { CHyprSignalListener unmap; CHyprSignalListener commit; CHyprSignalListener destroy; + CHyprSignalListener activate; + CHyprSignalListener configure; + CHyprSignalListener setGeometry; CHyprSignalListener updateState; CHyprSignalListener updateMetadata; + CHyprSignalListener resourceChange; } listeners; private: -- cgit v1.2.3