This is an automated email generated because a ref change occurred in the
git repository for project wmaker-crm.git.
The branch, master has been updated
via 3d993a7323ee7e316017d12f950862b43219a518 (commit)
via a4a6e65ca912fac7893809a9caa7f8944bb2b5f8 (commit)
from 4392fdc2910961c7e8896b0a880554ebb435f7db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3d993a7323ee7e316017d12f950862b43219a518
Author: David Maciejak <
david.m...@gmail.com>
Date: Mon, 29 Dec 2025 09:58:29 -0500
URL: <
https://repo.or.cz/wmaker-crm.git/3d993a7323ee7e31>
Fix UTF-8 usage in icon title
When pango is enabled and a window title contains UTF-8 chars,
there is a chance the miniaturized icon title will cut in 2 an UTF-8 char
leading to a glitch in the title.
---
src/misc.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/src/misc.c b/src/misc.c
index 4cab3584bdb7..ffd97e6ed940 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -259,13 +259,22 @@ void slide_windows(Window wins[], int n, int from_x, int from_y, int to_x, int t
eatExpose();
}
+/* find the start of a UTF-8 character at or before the given position */
+static int utf8_find_char_start(const char *string, int pos)
+{
+ while (pos > 0 && (string[pos] & 0xC0) == 0x80) {
+ pos--;
+ }
+ return pos;
+}
+
char *ShrinkString(WMFont *font, const char *string, int width)
{
int w, w1 = 0;
int p;
char *pos;
char *text;
- int p1, p2, t;
+ int p1, p2, t, utf8_safe_pos;
p = strlen(string);
w = WMWidthOfString(font, string, p);
@@ -303,7 +312,11 @@ char *ShrinkString(WMFont *font, const char *string, int width)
p2 = p;
t = (p2 - p1) / 2;
while (p2 > p1 && p1 != t) {
- w = WMWidthOfString(font, &string[p - t], t);
+ /* ensure we cut at UTF-8 character boundary */
+ utf8_safe_pos = utf8_find_char_start(string, p - t);
+ t = p - utf8_safe_pos;
+
+ w = WMWidthOfString(font, &string[utf8_safe_pos], t);
if (w > width) {
p2 = t;
t = p1 + (p2 - p1) / 2;
@@ -313,7 +326,10 @@ char *ShrinkString(WMFont *font, const char *string, int width)
} else
p2 = p1 = t;
}
- strcat(text, &string[p - p1]);
+
+ /* ensure final cut is at UTF-8 character boundary */
+ utf8_safe_pos = utf8_find_char_start(string, p - p1);
+ strcat(text, &string[utf8_safe_pos]);
return text;
}
commit a4a6e65ca912fac7893809a9caa7f8944bb2b5f8
Author: David Maciejak <
david.m...@gmail.com>
Date: Mon, 29 Dec 2025 09:32:31 -0500
URL: <
https://repo.or.cz/wmaker-crm.git/a4a6e65ca912fac7>
Fix for ignore client supplied icon attributes
As mentioned on the WMaker user mailing list some time ago
https://groups.google.com/g/wmaker-user/c/95M_pb_Qlbs/m/6qJLJSqoAwAJ
The Ignore client supplied icon from the windows attributes is not working.
That's especially visible with firefox and thunderbird when they are using
NET_WM_ICON to push the embedded icon.
That patch is making sure to ignore the embedded icon if the user defined one.
---
src/appicon.c | 15 +++++++++------
src/client.c | 17 +++++++++--------
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/src/appicon.c b/src/appicon.c
index 6d6ddf229338..b2f48ed6c7d2 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -1186,14 +1186,17 @@ static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window m
wapp->app_icon->running = 1;
wapp->app_icon->icon->owner = mainw;
- if (mainw->wm_hints && (mainw->wm_hints->flags & IconWindowHint))
- wapp->app_icon->icon->icon_win = mainw->wm_hints->icon_window;
- /* Update the icon images */
- wIconUpdate(wapp->app_icon->icon);
+ if (!WFLAGP(wwin, always_user_icon)) {
+ if (mainw->wm_hints && (mainw->wm_hints->flags & IconWindowHint))
+ wapp->app_icon->icon->icon_win = mainw->wm_hints->icon_window;
- /* Paint it */
- wAppIconPaint(wapp->app_icon);
+ /* Update the icon images */
+ wIconUpdate(wapp->app_icon->icon);
+
+ /* Paint it */
+ wAppIconPaint(wapp->app_icon);
+ }
}
}
diff --git a/src/client.c b/src/client.c
index 68c82c5239b0..2271f254b793 100644
--- a/src/client.c
+++ b/src/client.c
@@ -454,15 +454,16 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
/* update icon */
if ((wwin->wm_hints->flags & IconPixmapHint)
|| (wwin->wm_hints->flags & IconWindowHint)) {
- WApplication *wapp;
+ if (!WFLAGP(wwin, always_user_icon)) {
+ WApplication *wapp;
+ if (wwin->flags.miniaturized && wwin->icon)
+ wIconUpdate(wwin->icon);
- if (wwin->flags.miniaturized && wwin->icon)
- wIconUpdate(wwin->icon);
-
- wapp = wApplicationOf(wwin->main_window);
- if (wapp && wapp->app_icon) {
- wIconUpdate(wapp->app_icon->icon);
- wAppIconPaint(wapp->app_icon);
+ wapp = wApplicationOf(wwin->main_window);
+ if (wapp && wapp->app_icon) {
+ wIconUpdate(wapp->app_icon->icon);
+ wAppIconPaint(wapp->app_icon);
+ }
}
}
-----------------------------------------------------------------------
Summary of changes:
src/appicon.c | 15 +++++++++------
src/client.c | 17 +++++++++--------
src/misc.c | 22 +++++++++++++++++++---
3 files changed, 37 insertions(+), 17 deletions(-)
repo.or.cz automatic notification. Contact project admin
crm...@gmail.com
if you want to unsubscribe, or site admin
ad...@repo.or.cz if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")