From 6a077d522e050bfac37334d051c0e2688c0c43fd Mon Sep 17 00:00:00 2001
From: Scott Murray <scott.murray@konsulko.com>
Date: Fri, 13 Jun 2025 14:14:00 -0400
Subject: [PATCH 1/2] Fix AGL shell activation area behavior

Commit cfc5de68 accidentally broke using an activation area
configuration with either x or y set to 0.  Rework the logic
to use the specified configuration area if any of the position
or size values are non-zero.  This restores expected behavior
in the downstream AGL demos.  As well, drop the fallback
default activation area configuration, as it seems better to
not configure it at all if it has not been explicitly
configured.

Upstream-Status: Pending
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 shell/wayland/window.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/shell/wayland/window.cc b/shell/wayland/window.cc
index a271418..303f8cb 100644
--- a/shell/wayland/window.cc
+++ b/shell/wayland/window.cc
@@ -99,13 +99,11 @@ WaylandWindow::WaylandWindow(const size_t index,
       break;
     case WINDOW_BG:
       m_display->AglShellDoBackground(m_base_surface, 0);
-      if (m_activation_area.x && m_activation_area.y)
+      if (m_activation_area.x || m_activation_area.y ||
+	  m_activation_area.width || m_activation_area.height)
         m_display->AglShellDoSetupActivationArea(
             m_activation_area.x, m_activation_area.y, m_activation_area.width,
             m_activation_area.height, 0);
-      else
-        m_display->AglShellDoSetupActivationArea(
-            0, 160, m_activation_area.width, m_activation_area.height, 0);
       break;
     case WINDOW_PANEL_TOP:
       m_display->AglShellDoPanel(m_base_surface, AGL_SHELL_EDGE_TOP, 0);
-- 
2.49.0

