mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-12-22 12:19:49 +01:00
surface: set fully opaque
This commit is contained in:
parent
38e18b7077
commit
f3837e9d59
1 changed files with 8 additions and 0 deletions
|
@ -539,11 +539,19 @@ void CHyprpaper::renderWallpaperForMonitor(SMonitor* pMonitor) {
|
||||||
wl_surface_attach(pMonitor->pCurrentLayerSurface->pSurface, PBUFFER->buffer, 0, 0);
|
wl_surface_attach(pMonitor->pCurrentLayerSurface->pSurface, PBUFFER->buffer, 0, 0);
|
||||||
wl_surface_set_buffer_scale(pMonitor->pCurrentLayerSurface->pSurface, pMonitor->pCurrentLayerSurface->pFractionalScaleInfo ? 1 : pMonitor->scale);
|
wl_surface_set_buffer_scale(pMonitor->pCurrentLayerSurface->pSurface, pMonitor->pCurrentLayerSurface->pFractionalScaleInfo ? 1 : pMonitor->scale);
|
||||||
wl_surface_damage_buffer(pMonitor->pCurrentLayerSurface->pSurface, 0, 0, 0xFFFF, 0xFFFF);
|
wl_surface_damage_buffer(pMonitor->pCurrentLayerSurface->pSurface, 0, 0, 0xFFFF, 0xFFFF);
|
||||||
|
|
||||||
|
// our wps are always opaque
|
||||||
|
auto opaqueRegion = wl_compositor_create_region(g_pHyprpaper->m_sCompositor);
|
||||||
|
wl_region_add(opaqueRegion, 0, 0, PBUFFER->pixelSize.x, PBUFFER->pixelSize.y);
|
||||||
|
wl_surface_set_opaque_region(pMonitor->pCurrentLayerSurface->pSurface, opaqueRegion);
|
||||||
|
|
||||||
if (pMonitor->pCurrentLayerSurface->pFractionalScaleInfo) {
|
if (pMonitor->pCurrentLayerSurface->pFractionalScaleInfo) {
|
||||||
Debug::log(LOG, "Submitting viewport dest size %ix%i for %x", static_cast<int>(std::round(pMonitor->size.x)), static_cast<int>(std::round(pMonitor->size.y)), pMonitor->pCurrentLayerSurface);
|
Debug::log(LOG, "Submitting viewport dest size %ix%i for %x", static_cast<int>(std::round(pMonitor->size.x)), static_cast<int>(std::round(pMonitor->size.y)), pMonitor->pCurrentLayerSurface);
|
||||||
wp_viewport_set_destination(pMonitor->pCurrentLayerSurface->pViewport, static_cast<int>(std::round(pMonitor->size.x)), static_cast<int>(std::round(pMonitor->size.y)));
|
wp_viewport_set_destination(pMonitor->pCurrentLayerSurface->pViewport, static_cast<int>(std::round(pMonitor->size.x)), static_cast<int>(std::round(pMonitor->size.y)));
|
||||||
}
|
}
|
||||||
wl_surface_commit(pMonitor->pCurrentLayerSurface->pSurface);
|
wl_surface_commit(pMonitor->pCurrentLayerSurface->pSurface);
|
||||||
|
|
||||||
|
wl_region_destroy(opaqueRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we dont need to remove a wallpaper
|
// check if we dont need to remove a wallpaper
|
||||||
|
|
Loading…
Reference in a new issue