internal: wrap wlr surfaces (#1822)
This commit is contained in:
parent
d23bbd1687
commit
788a8f7c13
16 changed files with 179 additions and 45 deletions
|
|
@ -112,6 +112,8 @@ void Events::listener_mapLayerSurface(void* owner, void* data) {
|
|||
layersurface->layerSurface->mapped = true;
|
||||
layersurface->mapped = true;
|
||||
|
||||
layersurface->surface = layersurface->layerSurface->surface;
|
||||
|
||||
// anim
|
||||
layersurface->alpha.setConfig(g_pConfigManager->getAnimationPropertyConfig("fadeIn"));
|
||||
|
||||
|
|
@ -207,12 +209,15 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) {
|
|||
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromOutput(layersurface->layerSurface->output);
|
||||
|
||||
const bool WASLASTFOCUS = g_pCompositor->m_pLastFocus == layersurface->layerSurface->surface;
|
||||
|
||||
layersurface->surface = nullptr;
|
||||
|
||||
if (!PMONITOR)
|
||||
return;
|
||||
|
||||
// refocus if needed
|
||||
if (layersurface->layerSurface->surface == g_pCompositor->m_pLastFocus) {
|
||||
|
||||
if (WASLASTFOCUS) {
|
||||
Vector2D surfaceCoords;
|
||||
SLayerSurface* pFoundLayerSurface = nullptr;
|
||||
wlr_surface* foundSurface = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue