mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:46:00 +01:00
Log shifts
This commit is contained in:
parent
7eb2a1023b
commit
ed5c0a7d33
4 changed files with 51 additions and 38 deletions
|
@ -57,6 +57,8 @@ void Events::listener_newLayerSurface(wl_listener* listener, void* data) {
|
||||||
void Events::listener_destroyLayerSurface(wl_listener* listener, void* data) {
|
void Events::listener_destroyLayerSurface(wl_listener* listener, void* data) {
|
||||||
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_destroyLayerSurface);
|
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_destroyLayerSurface);
|
||||||
|
|
||||||
|
Debug::log(LOG, "LayerSurface %x destroyed", layersurface->layerSurface);
|
||||||
|
|
||||||
if (layersurface->layerSurface->mapped)
|
if (layersurface->layerSurface->mapped)
|
||||||
layersurface->layerSurface->mapped = false;
|
layersurface->layerSurface->mapped = false;
|
||||||
|
|
||||||
|
@ -70,8 +72,6 @@ void Events::listener_destroyLayerSurface(wl_listener* listener, void* data) {
|
||||||
|
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(layersurface->monitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(layersurface->monitorID);
|
||||||
|
|
||||||
Debug::log(LOG, "LayerSurface %x destroyed", layersurface->layerSurface);
|
|
||||||
|
|
||||||
// remove the layersurface as it's not used anymore
|
// remove the layersurface as it's not used anymore
|
||||||
PMONITOR->m_aLayerSurfaceLists[layersurface->layer].remove(layersurface);
|
PMONITOR->m_aLayerSurfaceLists[layersurface->layer].remove(layersurface);
|
||||||
delete layersurface;
|
delete layersurface;
|
||||||
|
@ -86,6 +86,8 @@ void Events::listener_destroyLayerSurface(wl_listener* listener, void* data) {
|
||||||
void Events::listener_mapLayerSurface(wl_listener* listener, void* data) {
|
void Events::listener_mapLayerSurface(wl_listener* listener, void* data) {
|
||||||
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_mapLayerSurface);
|
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_mapLayerSurface);
|
||||||
|
|
||||||
|
Debug::log(LOG, "LayerSurface %x mapped", layersurface->layerSurface);
|
||||||
|
|
||||||
layersurface->layerSurface->mapped = true;
|
layersurface->layerSurface->mapped = true;
|
||||||
|
|
||||||
wlr_surface_send_enter(layersurface->layerSurface->surface, layersurface->layerSurface->output);
|
wlr_surface_send_enter(layersurface->layerSurface->surface, layersurface->layerSurface->output);
|
||||||
|
@ -106,20 +108,18 @@ void Events::listener_mapLayerSurface(wl_listener* listener, void* data) {
|
||||||
|
|
||||||
if (layersurface->layerSurface->current.keyboard_interactive)
|
if (layersurface->layerSurface->current.keyboard_interactive)
|
||||||
g_pCompositor->focusSurface(layersurface->layerSurface->surface);
|
g_pCompositor->focusSurface(layersurface->layerSurface->surface);
|
||||||
|
|
||||||
Debug::log(LOG, "LayerSurface %x mapped", layersurface->layerSurface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_unmapLayerSurface(wl_listener* listener, void* data) {
|
void Events::listener_unmapLayerSurface(wl_listener* listener, void* data) {
|
||||||
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_unmapLayerSurface);
|
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_unmapLayerSurface);
|
||||||
|
|
||||||
|
Debug::log(LOG, "LayerSurface %x unmapped", layersurface->layerSurface);
|
||||||
|
|
||||||
if (layersurface->layerSurface->mapped)
|
if (layersurface->layerSurface->mapped)
|
||||||
layersurface->layerSurface->mapped = false;
|
layersurface->layerSurface->mapped = false;
|
||||||
|
|
||||||
if (layersurface->layerSurface->surface == g_pCompositor->m_pLastFocus)
|
if (layersurface->layerSurface->surface == g_pCompositor->m_pLastFocus)
|
||||||
g_pCompositor->m_pLastFocus = nullptr;
|
g_pCompositor->m_pLastFocus = nullptr;
|
||||||
|
|
||||||
Debug::log(LOG, "LayerSurface %x unmapped", layersurface->layerSurface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_commitLayerSurface(wl_listener* listener, void* data) {
|
void Events::listener_commitLayerSurface(wl_listener* listener, void* data) {
|
||||||
|
@ -162,6 +162,8 @@ void createSubsurface(wlr_subsurface* pSubSurface, SLayerSurface* pLayerSurface)
|
||||||
if (!pSubSurface || !pLayerSurface)
|
if (!pSubSurface || !pLayerSurface)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Debug::log(LOG, "Subsurface %x created", pSubSurface);
|
||||||
|
|
||||||
g_pCompositor->m_lSubsurfaces.push_back(SSubsurface());
|
g_pCompositor->m_lSubsurfaces.push_back(SSubsurface());
|
||||||
const auto PNEWSUBSURFACE = &g_pCompositor->m_lSubsurfaces.back();
|
const auto PNEWSUBSURFACE = &g_pCompositor->m_lSubsurfaces.back();
|
||||||
|
|
||||||
|
@ -198,12 +200,16 @@ void Events::listener_newSubsurface(wl_listener* listener, void* data) {
|
||||||
void Events::listener_mapSubsurface(wl_listener* listener, void* data) {
|
void Events::listener_mapSubsurface(wl_listener* listener, void* data) {
|
||||||
SSubsurface* subsurface = wl_container_of(listener, subsurface, listen_mapSubsurface);
|
SSubsurface* subsurface = wl_container_of(listener, subsurface, listen_mapSubsurface);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Subsurface %x mapped", subsurface);
|
||||||
|
|
||||||
damageSubsurface(subsurface, true);
|
damageSubsurface(subsurface, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_unmapSubsurface(wl_listener* listener, void* data) {
|
void Events::listener_unmapSubsurface(wl_listener* listener, void* data) {
|
||||||
SSubsurface* subsurface = wl_container_of(listener, subsurface, listen_unmapSubsurface);
|
SSubsurface* subsurface = wl_container_of(listener, subsurface, listen_unmapSubsurface);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Subsurface %x unmapped", subsurface);
|
||||||
|
|
||||||
damageSubsurface(subsurface, true);
|
damageSubsurface(subsurface, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +222,8 @@ void Events::listener_commitSubsurface(wl_listener* listener, void* data) {
|
||||||
void Events::listener_destroySubsurface(wl_listener* listener, void* data) {
|
void Events::listener_destroySubsurface(wl_listener* listener, void* data) {
|
||||||
SSubsurface* subsurface = wl_container_of(listener, subsurface, listen_destroySubsurface);
|
SSubsurface* subsurface = wl_container_of(listener, subsurface, listen_destroySubsurface);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Subsurface %x destroyed", subsurface);
|
||||||
|
|
||||||
wl_list_remove(&subsurface->listen_mapSubsurface.link);
|
wl_list_remove(&subsurface->listen_mapSubsurface.link);
|
||||||
wl_list_remove(&subsurface->listen_unmapSubsurface.link);
|
wl_list_remove(&subsurface->listen_unmapSubsurface.link);
|
||||||
wl_list_remove(&subsurface->listen_destroySubsurface.link);
|
wl_list_remove(&subsurface->listen_destroySubsurface.link);
|
||||||
|
|
|
@ -82,14 +82,14 @@ void Events::listener_startDrag(wl_listener* listener, void* data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_InhibitActivate(wl_listener* listener, void* data) {
|
void Events::listener_InhibitActivate(wl_listener* listener, void* data) {
|
||||||
g_pCompositor->m_sSeat.exclusiveClient = g_pCompositor->m_sWLRInhibitMgr->active_client;
|
|
||||||
|
|
||||||
Debug::log(LOG, "Activated exclusive for %x.", g_pCompositor->m_sSeat.exclusiveClient);
|
Debug::log(LOG, "Activated exclusive for %x.", g_pCompositor->m_sSeat.exclusiveClient);
|
||||||
|
|
||||||
|
g_pCompositor->m_sSeat.exclusiveClient = g_pCompositor->m_sWLRInhibitMgr->active_client;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_InhibitDeactivate(wl_listener* listener, void* data) {
|
void Events::listener_InhibitDeactivate(wl_listener* listener, void* data) {
|
||||||
|
Debug::log(LOG, "Deactivated exclusive.");
|
||||||
|
|
||||||
g_pCompositor->m_sSeat.exclusiveClient = nullptr;
|
g_pCompositor->m_sSeat.exclusiveClient = nullptr;
|
||||||
g_pInputManager->refocus();
|
g_pInputManager->refocus();
|
||||||
|
|
||||||
Debug::log(LOG, "Deactivated exclusive.");
|
|
||||||
}
|
}
|
|
@ -46,49 +46,50 @@ void createNewPopup(wlr_xdg_popup* popup, void* parent, bool parentIsLayer) {
|
||||||
void Events::listener_newPopup(wl_listener* listener, void* data) {
|
void Events::listener_newPopup(wl_listener* listener, void* data) {
|
||||||
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_newPopup);
|
SLayerSurface* layersurface = wl_container_of(listener, layersurface, listen_newPopup);
|
||||||
|
|
||||||
|
Debug::log(LOG, "New layer popup created from surface %x", layersurface);
|
||||||
|
|
||||||
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
||||||
|
|
||||||
createNewPopup(WLRPOPUP, layersurface, true);
|
createNewPopup(WLRPOPUP, layersurface, true);
|
||||||
|
|
||||||
Debug::log(LOG, "New layer popup created from surface %x", layersurface);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_newPopupFromPopup(wl_listener* listener, void* data) {
|
void Events::listener_newPopupFromPopup(wl_listener* listener, void* data) {
|
||||||
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_newPopupFromPopup);
|
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_newPopupFromPopup);
|
||||||
|
|
||||||
|
Debug::log(LOG, "New layer popup created from popup %x", layerPopup);
|
||||||
|
|
||||||
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
||||||
|
|
||||||
createNewPopup(WLRPOPUP, layerPopup, true);
|
createNewPopup(WLRPOPUP, layerPopup, true);
|
||||||
|
|
||||||
Debug::log(LOG, "New layer popup created from popup %x", layerPopup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_destroyPopup(wl_listener* listener, void* data) {
|
void Events::listener_destroyPopup(wl_listener* listener, void* data) {
|
||||||
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_destroyPopup);
|
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_destroyPopup);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Destroyed popup %x", layerPopup);
|
||||||
|
|
||||||
wl_list_remove(&layerPopup->listen_mapPopup.link);
|
wl_list_remove(&layerPopup->listen_mapPopup.link);
|
||||||
wl_list_remove(&layerPopup->listen_unmapPopup.link);
|
wl_list_remove(&layerPopup->listen_unmapPopup.link);
|
||||||
wl_list_remove(&layerPopup->listen_destroyPopup.link);
|
wl_list_remove(&layerPopup->listen_destroyPopup.link);
|
||||||
wl_list_remove(&layerPopup->listen_commitPopup.link);
|
wl_list_remove(&layerPopup->listen_commitPopup.link);
|
||||||
|
|
||||||
g_pCompositor->m_lLayerPopups.remove(*layerPopup);
|
g_pCompositor->m_lLayerPopups.remove(*layerPopup);
|
||||||
|
|
||||||
Debug::log(LOG, "Destroyed popup %x", layerPopup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_mapPopup(wl_listener* listener, void* data) {
|
void Events::listener_mapPopup(wl_listener* listener, void* data) {
|
||||||
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_mapPopup);
|
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_mapPopup);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Mapped popup %x", layerPopup);
|
||||||
|
|
||||||
const auto PLAYER = g_pCompositor->getLayerForPopup(layerPopup);
|
const auto PLAYER = g_pCompositor->getLayerForPopup(layerPopup);
|
||||||
|
|
||||||
wlr_surface_send_enter(layerPopup->popup->base->surface, PLAYER->layerSurface->output);
|
wlr_surface_send_enter(layerPopup->popup->base->surface, PLAYER->layerSurface->output);
|
||||||
|
|
||||||
Debug::log(LOG, "Mapped popup %x", layerPopup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_unmapPopup(wl_listener* listener, void* data) {
|
void Events::listener_unmapPopup(wl_listener* listener, void* data) {
|
||||||
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_unmapPopup);
|
SLayerPopup* layerPopup = wl_container_of(listener, layerPopup, listen_unmapPopup);
|
||||||
|
|
||||||
|
Debug::log(LOG, "LayerPopup %x unmapped", layerPopup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_commitPopup(wl_listener* listener, void* data) {
|
void Events::listener_commitPopup(wl_listener* listener, void* data) {
|
||||||
|
@ -100,6 +101,8 @@ void createNewPopupXDG(wlr_xdg_popup* popup, void* parent, bool parentIsWindow)
|
||||||
if (!popup)
|
if (!popup)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Debug::log(LOG, "New XDG Popup %x created", popup);
|
||||||
|
|
||||||
g_pCompositor->m_lXDGPopups.push_back(SXDGPopup());
|
g_pCompositor->m_lXDGPopups.push_back(SXDGPopup());
|
||||||
const auto PNEWPOPUP = &g_pCompositor->m_lXDGPopups.back();
|
const auto PNEWPOPUP = &g_pCompositor->m_lXDGPopups.back();
|
||||||
|
|
||||||
|
@ -127,39 +130,39 @@ void createNewPopupXDG(wlr_xdg_popup* popup, void* parent, bool parentIsWindow)
|
||||||
void Events::listener_newPopupXDG(wl_listener* listener, void* data) {
|
void Events::listener_newPopupXDG(wl_listener* listener, void* data) {
|
||||||
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_newPopupXDG);
|
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_newPopupXDG);
|
||||||
|
|
||||||
|
Debug::log(LOG, "New layer popup created from XDG window %x -> %s", PWINDOW, PWINDOW->m_szTitle.c_str());
|
||||||
|
|
||||||
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
||||||
|
|
||||||
createNewPopupXDG(WLRPOPUP, PWINDOW, true);
|
createNewPopupXDG(WLRPOPUP, PWINDOW, true);
|
||||||
|
|
||||||
Debug::log(LOG, "New layer popup created from XDG window %x -> %s", PWINDOW, PWINDOW->m_szTitle.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_newPopupFromPopupXDG(wl_listener* listener, void* data) {
|
void Events::listener_newPopupFromPopupXDG(wl_listener* listener, void* data) {
|
||||||
SXDGPopup* PPOPUP = wl_container_of(listener, PPOPUP, listen_newPopupFromPopupXDG);
|
SXDGPopup* PPOPUP = wl_container_of(listener, PPOPUP, listen_newPopupFromPopupXDG);
|
||||||
|
|
||||||
|
Debug::log(LOG, "New layer popup created from XDG popup %x -> %s", PPOPUP, PPOPUP->parentWindow->m_szTitle.c_str());
|
||||||
|
|
||||||
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
const auto WLRPOPUP = (wlr_xdg_popup*)data;
|
||||||
|
|
||||||
createNewPopupXDG(WLRPOPUP, PPOPUP, true);
|
createNewPopupXDG(WLRPOPUP, PPOPUP, true);
|
||||||
|
|
||||||
Debug::log(LOG, "New layer popup created from XDG popup %x -> %s", PPOPUP, PPOPUP->parentWindow->m_szTitle.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_mapPopupXDG(wl_listener* listener, void* data) {
|
void Events::listener_mapPopupXDG(wl_listener* listener, void* data) {
|
||||||
|
Debug::log(LOG, "New XDG Popup mapped");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_unmapPopupXDG(wl_listener* listener, void* data) {
|
void Events::listener_unmapPopupXDG(wl_listener* listener, void* data) {
|
||||||
|
Debug::log(LOG, "XDG Popup unmapped");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_destroyPopupXDG(wl_listener* listener, void* data) {
|
void Events::listener_destroyPopupXDG(wl_listener* listener, void* data) {
|
||||||
SXDGPopup* PPOPUP = wl_container_of(listener, PPOPUP, listen_destroyPopupXDG);
|
SXDGPopup* PPOPUP = wl_container_of(listener, PPOPUP, listen_destroyPopupXDG);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Destroyed popup XDG %x", PPOPUP);
|
||||||
|
|
||||||
wl_list_remove(&PPOPUP->listen_mapPopupXDG.link);
|
wl_list_remove(&PPOPUP->listen_mapPopupXDG.link);
|
||||||
wl_list_remove(&PPOPUP->listen_unmapPopupXDG.link);
|
wl_list_remove(&PPOPUP->listen_unmapPopupXDG.link);
|
||||||
wl_list_remove(&PPOPUP->listen_destroyPopupXDG.link);
|
wl_list_remove(&PPOPUP->listen_destroyPopupXDG.link);
|
||||||
|
|
||||||
g_pCompositor->m_lXDGPopups.remove(*PPOPUP);
|
g_pCompositor->m_lXDGPopups.remove(*PPOPUP);
|
||||||
|
|
||||||
Debug::log(LOG, "Destroyed popup XDG %x", PPOPUP);
|
|
||||||
}
|
}
|
|
@ -112,6 +112,8 @@ void Events::listener_mapWindow(wl_listener* listener, void* data) {
|
||||||
void Events::listener_unmapWindow(wl_listener* listener, void* data) {
|
void Events::listener_unmapWindow(wl_listener* listener, void* data) {
|
||||||
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_unmapWindow);
|
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_unmapWindow);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Window %x unmapped", PWINDOW);
|
||||||
|
|
||||||
if (g_pXWaylandManager->getWindowSurface(PWINDOW) == g_pCompositor->m_pLastFocus)
|
if (g_pXWaylandManager->getWindowSurface(PWINDOW) == g_pCompositor->m_pLastFocus)
|
||||||
g_pCompositor->m_pLastFocus = nullptr;
|
g_pCompositor->m_pLastFocus = nullptr;
|
||||||
|
|
||||||
|
@ -134,8 +136,6 @@ void Events::listener_unmapWindow(wl_listener* listener, void* data) {
|
||||||
// This might be way more sinister in nature and have a problem more deeply
|
// This might be way more sinister in nature and have a problem more deeply
|
||||||
// rooted in the code.
|
// rooted in the code.
|
||||||
// g_pInputManager->refocus();
|
// g_pInputManager->refocus();
|
||||||
|
|
||||||
Debug::log(LOG, "Window %x unmapped", PWINDOW);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_commitWindow(wl_listener* listener, void* data) {
|
void Events::listener_commitWindow(wl_listener* listener, void* data) {
|
||||||
|
@ -147,6 +147,8 @@ void Events::listener_commitWindow(wl_listener* listener, void* data) {
|
||||||
void Events::listener_destroyWindow(wl_listener* listener, void* data) {
|
void Events::listener_destroyWindow(wl_listener* listener, void* data) {
|
||||||
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_destroyWindow);
|
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_destroyWindow);
|
||||||
|
|
||||||
|
Debug::log(LOG, "Window %x destroyed", PWINDOW);
|
||||||
|
|
||||||
if (g_pXWaylandManager->getWindowSurface(PWINDOW) == g_pCompositor->m_pLastFocus)
|
if (g_pXWaylandManager->getWindowSurface(PWINDOW) == g_pCompositor->m_pLastFocus)
|
||||||
g_pCompositor->m_pLastFocus = nullptr;
|
g_pCompositor->m_pLastFocus = nullptr;
|
||||||
|
|
||||||
|
@ -157,8 +159,6 @@ void Events::listener_destroyWindow(wl_listener* listener, void* data) {
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW);
|
g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW);
|
||||||
|
|
||||||
Debug::log(LOG, "Window %x destroyed", PWINDOW);
|
|
||||||
|
|
||||||
wl_list_remove(&PWINDOW->listen_mapWindow.link);
|
wl_list_remove(&PWINDOW->listen_mapWindow.link);
|
||||||
wl_list_remove(&PWINDOW->listen_unmapWindow.link);
|
wl_list_remove(&PWINDOW->listen_unmapWindow.link);
|
||||||
wl_list_remove(&PWINDOW->listen_destroyWindow.link);
|
wl_list_remove(&PWINDOW->listen_destroyWindow.link);
|
||||||
|
@ -180,17 +180,17 @@ void Events::listener_setTitleWindow(wl_listener* listener, void* data) {
|
||||||
if (!g_pCompositor->windowValidMapped(PWINDOW))
|
if (!g_pCompositor->windowValidMapped(PWINDOW))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
|
||||||
|
|
||||||
Debug::log(LOG, "Window %x set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str());
|
Debug::log(LOG, "Window %x set title to %s", PWINDOW, PWINDOW->m_szTitle.c_str());
|
||||||
|
|
||||||
|
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_fullscreenWindow(wl_listener* listener, void* data) {
|
void Events::listener_fullscreenWindow(wl_listener* listener, void* data) {
|
||||||
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_fullscreenWindow);
|
CWindow* PWINDOW = wl_container_of(listener, PWINDOW, listen_fullscreenWindow);
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW);
|
|
||||||
|
|
||||||
Debug::log(LOG, "Window %x fullscreen to %i", PWINDOW, PWINDOW->m_bIsFullscreen);
|
Debug::log(LOG, "Window %x fullscreen to %i", PWINDOW, PWINDOW->m_bIsFullscreen);
|
||||||
|
|
||||||
|
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_activate(wl_listener* listener, void* data) {
|
void Events::listener_activate(wl_listener* listener, void* data) {
|
||||||
|
@ -217,6 +217,8 @@ void Events::listener_configureX11(wl_listener* listener, void* data) {
|
||||||
void Events::listener_surfaceXWayland(wl_listener* listener, void* data) {
|
void Events::listener_surfaceXWayland(wl_listener* listener, void* data) {
|
||||||
const auto XWSURFACE = (wlr_xwayland_surface*)data;
|
const auto XWSURFACE = (wlr_xwayland_surface*)data;
|
||||||
|
|
||||||
|
Debug::log(LOG, "New XWayland Surface created.");
|
||||||
|
|
||||||
g_pCompositor->m_lWindows.push_back(CWindow());
|
g_pCompositor->m_lWindows.push_back(CWindow());
|
||||||
const auto PNEWWINDOW = &g_pCompositor->m_lWindows.back();
|
const auto PNEWWINDOW = &g_pCompositor->m_lWindows.back();
|
||||||
|
|
||||||
|
@ -231,14 +233,14 @@ void Events::listener_surfaceXWayland(wl_listener* listener, void* data) {
|
||||||
wl_signal_add(&XWSURFACE->events.set_title, &PNEWWINDOW->listen_setTitleWindow);
|
wl_signal_add(&XWSURFACE->events.set_title, &PNEWWINDOW->listen_setTitleWindow);
|
||||||
wl_signal_add(&XWSURFACE->events.destroy, &PNEWWINDOW->listen_destroyWindow);
|
wl_signal_add(&XWSURFACE->events.destroy, &PNEWWINDOW->listen_destroyWindow);
|
||||||
wl_signal_add(&XWSURFACE->events.request_fullscreen, &PNEWWINDOW->listen_fullscreenWindow);
|
wl_signal_add(&XWSURFACE->events.request_fullscreen, &PNEWWINDOW->listen_fullscreenWindow);
|
||||||
|
|
||||||
Debug::log(LOG, "New XWayland Surface created.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_newXDGSurface(wl_listener* listener, void* data) {
|
void Events::listener_newXDGSurface(wl_listener* listener, void* data) {
|
||||||
// A window got opened
|
// A window got opened
|
||||||
const auto XDGSURFACE = (wlr_xdg_surface*)data;
|
const auto XDGSURFACE = (wlr_xdg_surface*)data;
|
||||||
|
|
||||||
|
Debug::log(LOG, "New XDG Surface created. (%ix%i at %i %i)", XDGSURFACE->current.geometry.width, XDGSURFACE->current.geometry.height, XDGSURFACE->current.geometry.x, XDGSURFACE->current.geometry.y);
|
||||||
|
|
||||||
if (XDGSURFACE->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
if (XDGSURFACE->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||||
return; // TODO: handle?
|
return; // TODO: handle?
|
||||||
|
|
||||||
|
@ -252,8 +254,6 @@ void Events::listener_newXDGSurface(wl_listener* listener, void* data) {
|
||||||
wl_signal_add(&XDGSURFACE->events.destroy, &PNEWWINDOW->listen_destroyWindow);
|
wl_signal_add(&XDGSURFACE->events.destroy, &PNEWWINDOW->listen_destroyWindow);
|
||||||
wl_signal_add(&XDGSURFACE->toplevel->events.set_title, &PNEWWINDOW->listen_setTitleWindow);
|
wl_signal_add(&XDGSURFACE->toplevel->events.set_title, &PNEWWINDOW->listen_setTitleWindow);
|
||||||
wl_signal_add(&XDGSURFACE->toplevel->events.request_fullscreen, &PNEWWINDOW->listen_fullscreenWindow);
|
wl_signal_add(&XDGSURFACE->toplevel->events.request_fullscreen, &PNEWWINDOW->listen_fullscreenWindow);
|
||||||
|
|
||||||
Debug::log(LOG, "New XDG Surface created.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -264,6 +264,8 @@ void createSubsurface(CWindow* pWindow, wlr_subsurface* pSubsurface) {
|
||||||
if (!pWindow || !pSubsurface)
|
if (!pWindow || !pSubsurface)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Debug::log(LOG, "New Window Subsurface %x created", pSubsurface);
|
||||||
|
|
||||||
g_pCompositor->m_lSubsurfaces.push_back(SSubsurface());
|
g_pCompositor->m_lSubsurfaces.push_back(SSubsurface());
|
||||||
const auto PNEWSUBSURFACE = &g_pCompositor->m_lSubsurfaces.back();
|
const auto PNEWSUBSURFACE = &g_pCompositor->m_lSubsurfaces.back();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue