This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch feature/nm-vpn-support
in repository enlightenment.

View the commit online.

commit cb82af462a03097bca62aeaa9693867e269137f7
Author: [email protected] <[email protected]>
AuthorDate: Thu May 21 21:50:10 2026 -0600

    fix(networkmanager): keep primary state across VPN-only ActiveConnections change
    
    ActiveConnections PropertiesChanged fires whenever any active connection
    appears or disappears — including VPN tunnels.  The handler used to
    unconditionally clear nm->active_ap_path / nm->ip_address and re-probe
    asynchronously, which made the wifi row's subtitle flap from the IP back
    to the security label ("wpa2") for a few hundred milliseconds while the
    re-probe completed.
    
    If our currently-tracked primary is still in the new active set, only the
    VPN (or another non-primary) is changing.  Skip the teardown and re-probe
    in that case; just reconcile VPN bindings against the new set.
---
 src/modules/networkmanager/e_networkmanager.c | 46 +++++++++++++++++++--------
 1 file changed, 32 insertions(+), 14 deletions(-)

diff --git a/src/modules/networkmanager/e_networkmanager.c b/src/modules/networkmanager/e_networkmanager.c
index f456b9bd9..089bf0d16 100644
--- a/src/modules/networkmanager/e_networkmanager.c
+++ b/src/modules/networkmanager/e_networkmanager.c
@@ -1571,23 +1571,41 @@ _manager_prop_changed(void *data, const Eldbus_Message *msg)
                     eldbus_message_iter_get_and_next(conn_array, 'o', &aconn_path))
                active_paths[n_active++] = aconn_path;
 
-             /* Advance generation so any in-flight probes from the previous
-              * batch are discarded in their callbacks.  Then clear the old
-              * watchers so we don't display a stale connection while the new
-              * probes are in flight. */
-             nm->probe_generation++;
-             _manager_active_conn_watch_free(nm);
-             _manager_ip4_watch_free(nm);
+             /* If the connection we currently track is still in the new
+              * active set, only the VPN (or some other non-primary) is
+              * changing — leave the wifi/ethernet primary state alone so
+              * the popup's IP / security subtitle doesn't flap to "wpa2"
+              * for the few hundred ms it takes the re-probe to complete. */
+             {
+                Eina_Bool primary_still_active = EINA_FALSE;
+                unsigned int i;
+                if (nm->active_connection_path)
+                  {
+                     for (i = 0; i < n_active; i++)
+                       if (!strcmp(nm->active_connection_path, active_paths[i]))
+                         { primary_still_active = EINA_TRUE; break; }
+                  }
+
+                if (!primary_still_active)
+                  {
+                     /* Advance generation so any in-flight probes from the
+                      * previous batch are discarded.  Then clear the old
+                      * watchers so we don't display a stale connection
+                      * while the new probes are in flight. */
+                     nm->probe_generation++;
+                     _manager_active_conn_watch_free(nm);
+                     _manager_ip4_watch_free(nm);
+
+                     if (n_active > 0)
+                       for (i = 0; i < n_active; i++)
+                         _manager_probe_active_conn(nm, active_paths[i]);
+                  }
+             }
 
              if (n_active > 0)
                {
-                  unsigned int i;
-                  /* Try each active connection — _active_conn_probe_cb
-                   * filters out bridge/vpn types and only adopts wifi/ethernet */
-                  for (i = 0; i < n_active; i++)
-                    _manager_probe_active_conn(nm, active_paths[i]);
-
-                  /* Reconcile VPN bindings against the new active set */
+                  /* Reconcile VPN bindings against the new active set
+                   * unconditionally — it's the cheap part. */
                   _enm_vpn_reconcile_active(nm, active_paths, n_active);
                }
              else

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to