desktop: cleanup, unify desktop elements as views (#12563)

This commit is contained in:
Vaxry 2025-12-08 15:04:40 +00:00 committed by GitHub
parent 834f019bab
commit 920353370b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 2636 additions and 2337 deletions

View file

@ -372,9 +372,9 @@ bool CToplevelExportFrame::shouldOverlayCursor() const {
if (!pointerSurfaceResource)
return false;
auto pointerSurface = CWLSurface::fromResource(pointerSurfaceResource);
auto pointerSurface = Desktop::View::CWLSurface::fromResource(pointerSurfaceResource);
return pointerSurface && pointerSurface->getWindow() == m_window;
return pointerSurface && Desktop::View::CWindow::fromView(pointerSurface->view()) == m_window;
}
bool CToplevelExportFrame::good() {
@ -382,7 +382,11 @@ bool CToplevelExportFrame::good() {
}
CToplevelExportProtocol::CToplevelExportProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) {
;
static auto P1 = g_pHookSystem->hookDynamic("closeWindow", [this](void* self, SCallbackInfo& info, std::any data) {
auto window = std::any_cast<PHLWINDOW>(data);
onWindowUnmap(window);
});
}
void CToplevelExportProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) {