summaryrefslogtreecommitdiff
path: root/src/events/Windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r--src/events/Windows.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index bbd7421a..71f1775f 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -32,6 +32,9 @@ void addViewCoords(void* pWindow, int* x, int* y) {
void Events::listener_mapWindow(void* owner, void* data) {
CWindow* PWINDOW = (CWindow*)owner;
+ static auto *const PINACTIVEALPHA = &g_pConfigManager->getConfigValuePtr("decoration:inactive_opacity")->floatValue;
+ static auto *const PACTIVEALPHA = &g_pConfigManager->getConfigValuePtr("decoration:active_opacity")->floatValue;
+
const auto PMONITOR = g_pCompositor->getMonitorFromCursor();
const auto PWORKSPACE = PMONITOR->specialWorkspaceOpen ? g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID) : g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
PWINDOW->m_iMonitorID = PMONITOR->ID;
@@ -235,8 +238,11 @@ void Events::listener_mapWindow(void* owner, void* data) {
PWINDOW->m_vPseudoSize = PWINDOW->m_vRealSize.goalv() - Vector2D(10,10);
}
- if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus && PWINDOW->m_iX11Type != 2)
+ if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus && PWINDOW->m_iX11Type != 2) {
g_pCompositor->focusWindow(PWINDOW);
+ PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PACTIVEALPHA);
+ } else
+ PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PINACTIVEALPHA);
Debug::log(LOG, "Window got assigned a surfaceTreeNode %x", PWINDOW->m_pSurfaceTree);