summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2006-06-23 22:42:31 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2006-06-23 22:42:31 +0000
commit73b13bff1227ce46588589fc8931274d83bfe1fd (patch)
tree45060baf8b177540364a028a0ff9e952e541cc09 /riscos
parent878ef9883edbdff8b73cd95d099a59783d807e6b (diff)
downloadnetsurf-73b13bff1227ce46588589fc8931274d83bfe1fd.tar.gz
netsurf-73b13bff1227ce46588589fc8931274d83bfe1fd.tar.bz2
Add workaround to bug in Pinboard not displaying some windows when iconised
svn path=/trunk/netsurf/; revision=2641
Diffstat (limited to 'riscos')
-rw-r--r--riscos/window.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 580aa9f25..9d65164e6 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -3078,6 +3078,15 @@ void ro_gui_window_iconise(struct gui_window *g, wimp_full_message_window_info *
strncpy(wi->title, g->title, sizeof(wi->title));
wi->title[sizeof(wi->title) - 1] = '\0';
+ if (wimptextop_string_width(wi->title, 0) > 128) {
+ /* work around bug in Pinboard where it will fail to display
+ * the icon if the text is very wide */
+ if (strlen(wi->title) > 10)
+ wi->title[10] = '\0'; /* pinboard does this anyway */
+ while (wimptextop_string_width(wi->title, 0) > 182)
+ wi->title[strlen(wi->title) - 1] = '\0';
+ }
+
wi->size = sizeof(wimp_full_message_window_info);
wi->your_ref = wi->my_ref;
error = xwimp_send_message(wimp_USER_MESSAGE, (wimp_message*)wi, wi->sender);