kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=da30b900523ea9568a6f4c3cef35a69313dd8765
commit da30b900523ea9568a6f4c3cef35a69313dd8765 Author: Kim Woelders <[email protected]> Date: Sun Feb 13 20:18:45 2022 +0100 Disable setting internal window title via ipc (properly) Previously, when trying to set the title via ipc, the window WM_NAME and _NET_WM_NAME properties would be changed, but the border title (e16's perception of the properties) would not be updated because PropertyChange notifications for internal windows are discarded (to avoid processing changes we already know have happened, IIRC). Now the internal window name properties are not changed, avoiding inconsistency between properties and internal state (and border title). --- src/ewin-ops.c | 14 ++++++++++++++ src/ewins.h | 1 + src/ipc.c | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ewin-ops.c b/src/ewin-ops.c index 4180c073..bdd63c93 100644 --- a/src/ewin-ops.c +++ b/src/ewin-ops.c @@ -1557,6 +1557,20 @@ EwinOpSetLayer(EWin * ewin, int source __UNUSED__, int layer) SnapshotEwinUpdate(ewin, SNAP_USE_LAYER); } +void +EwinOpSetTitle(EWin * ewin, const char *title) +{ + /* Note! The window border title is updated via the PropertyChange + * notification(s) caused by the property changes done below. + * PropertyChange notifications for internal windows are ignored so + * the window title for internal windows will not be updated that way. + * Therefore, let's just not change the properties either. */ + if (EwinIsInternal(ewin)) + return; + + HintsSetWindowName(EwinGetClientWin(ewin), title); +} + void EwinOpSetBorder(EWin * ewin, int source __UNUSED__, const char *name) { diff --git a/src/ewins.h b/src/ewins.h index 94a2ef29..1cb31af7 100644 --- a/src/ewins.h +++ b/src/ewins.h @@ -475,6 +475,7 @@ void EwinOpSkipLists(EWin * ewin, int source, int skip); void EwinOpIconify(EWin * ewin, int source, int on); void EwinOpShade(EWin * ewin, int source, int on); void EwinOpSetLayer(EWin * ewin, int source, int layer); +void EwinOpSetTitle(EWin * ewin, const char *title); void EwinOpSetBorder(EWin * ewin, int source, const char *name); void EwinOpSetOpacity(EWin * ewin, int source, int opacity); void EwinOpSetFocusedOpacity(EWin * ewin, int source, diff --git a/src/ipc.c b/src/ipc.c index fbd42c70..220dc001 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -485,7 +485,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm) IpcPrintf("title: %s\n", EwinGetIcccmName(ewin)); goto done; } - HintsSetWindowName(EwinGetClientWin(ewin), prm); + EwinOpSetTitle(ewin, prm); break; case EWIN_OP_CLOSE: --
