focus new layers

This commit is contained in:
vaxerski 2022-03-20 14:41:33 +01:00
parent f8a731b10b
commit e7abda1b2b

View file

@ -173,7 +173,6 @@ void Events::listener_newLayerSurface(wl_listener* listener, void* data) {
WLRLAYERSURFACE->data = layerSurface; WLRLAYERSURFACE->data = layerSurface;
layerSurface->monitorID = PMONITOR->ID; layerSurface->monitorID = PMONITOR->ID;
// todo: arrange
Debug::log(LOG, "LayerSurface %x (namespace %s layer %d) created on monitor %s", layerSurface, layerSurface->layerSurface->_namespace, layerSurface->layer, PMONITOR->szName.c_str()); Debug::log(LOG, "LayerSurface %x (namespace %s layer %d) created on monitor %s", layerSurface, layerSurface->layerSurface->_namespace, layerSurface->layer, PMONITOR->szName.c_str());
} }
@ -205,6 +204,9 @@ void Events::listener_mapLayerSurface(wl_listener* listener, void* data) {
wlr_surface_send_enter(layersurface->layerSurface->surface, layersurface->layerSurface->output); wlr_surface_send_enter(layersurface->layerSurface->surface, layersurface->layerSurface->output);
if (layersurface->layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP || layersurface->layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY)
g_pCompositor->focusSurface(layersurface->layerSurface->surface);
Debug::log(LOG, "LayerSurface %x mapped", layersurface); Debug::log(LOG, "LayerSurface %x mapped", layersurface);
} }