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

git pushed a commit to branch master
in repository e16.

View the commit online.

commit 672d4327dce880e261e5d10ed69f23f01bbc24e4
Author: Kim Woelders <[email protected]>
AuthorDate: Mon Mar 2 16:22:48 2026 +0100

    snaps: Enable matching title when changed after window is mapped
---
 src/ewins.c |  5 +++--
 src/snaps.c | 21 +++++++++++++++++----
 src/snaps.h |  2 +-
 3 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/ewins.c b/src/ewins.c
index 2a6f31ff..a7c3f512 100644
--- a/src/ewins.c
+++ b/src/ewins.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2025 Kim Woelders
+ * Copyright (C) 2004-2026 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -337,7 +337,7 @@ EwinConfigure(EWin *ewin)
     if (!EwinIsInternal(ewin) && Mode.wm.startup)
         EHintsGetInfo(ewin);    /* E restart hints */
     EwinHintsInferProps(ewin);
-    SnapshotEwinApply(ewin);    /* Apply saved settings */
+    SnapshotEwinApply(ewin, 0); /* Apply saved settings */
 
     if (ewin->save_fs.layer < 0)
         ewin->save_fs.layer = EoGetLayer(ewin);
@@ -2138,6 +2138,7 @@ EwinChangesProcess(EWin *ewin)
 
     if (EWinChanges.flags & EWIN_CHANGE_NAME)
     {
+        SnapshotEwinApply(ewin, 1);
         EwinBorderUpdateInfo(ewin);
         EwinBorderCalcSizes(ewin, 1);
     }
diff --git a/src/snaps.c b/src/snaps.c
index 751470ee..2845bc5f 100644
--- a/src/snaps.c
+++ b/src/snaps.c
@@ -1414,7 +1414,7 @@ SnapshotsLoad(void)
 
 /* make a client window conform to snapshot info */
 void
-SnapshotEwinApply(EWin *ewin)
+SnapshotEwinApply(EWin *ewin, int now)
 {
     Snapshot       *sn;
     int             ax, ay;
@@ -1447,9 +1447,6 @@ SnapshotEwinApply(EWin *ewin)
         ewin->pinned = EMEMDUP(DeskArea, sn->pinned, sn->num_pinned);
     }
 
-    if (use_flags & SNAP_USE_DESK)
-        EoSetDesk(ewin, DeskGetValid(sn->desktop));
-
     if (use_flags & SNAP_USE_SIZE)
     {
         ewin->client.w = sn->w;
@@ -1482,8 +1479,24 @@ SnapshotEwinApply(EWin *ewin)
         }
     }
 
+    if (now && (use_flags & (SNAP_USE_POS | SNAP_USE_SIZE)))
+        EwinMoveResize(ewin, ewin->client.x, ewin->client.y,
+                       ewin->client.w, ewin->client.h, 0);
+
+    if (use_flags & SNAP_USE_DESK)
+    {
+        if (now)
+            EwinMoveToDesktop(ewin, DeskGetValid(sn->desktop));
+        else
+            EoSetDesk(ewin, DeskGetValid(sn->desktop));
+    }
+
     if (use_flags & SNAP_USE_LAYER)
+    {
         EoSetLayer(ewin, sn->layer);
+        if (now)
+            EwinRaise(ewin);
+    }
 
     if (use_flags & SNAP_USE_SKIP_LISTS)
     {
diff --git a/src/snaps.h b/src/snaps.h
index 626d5b25..73d9cbfd 100644
--- a/src/snaps.h
+++ b/src/snaps.h
@@ -54,7 +54,7 @@ void            SnapshotsLoad(void);
 void            SnapshotsSave(void);
 void            SnapshotsSpawn(void);
 
-void            SnapshotEwinApply(EWin * ewin);
+void            SnapshotEwinApply(EWin * ewin, int now);
 void            SnapshotEwinUnmatch(EWin * ewin);
 void            SnapshotEwinUpdate(const EWin * ewin, unsigned int flags);
 void            SnapshotEwinParse(EWin * ewin, const char *params);

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

Reply via email to