mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-28 12:24:18 +03:00
Add workaround to bug in Pinboard not displaying some windows when iconised
svn path=/trunk/netsurf/; revision=2641
This commit is contained in:
parent
878ef9883e
commit
73b13bff12
@ -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));
|
strncpy(wi->title, g->title, sizeof(wi->title));
|
||||||
wi->title[sizeof(wi->title) - 1] = '\0';
|
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->size = sizeof(wimp_full_message_window_info);
|
||||||
wi->your_ref = wi->my_ref;
|
wi->your_ref = wi->my_ref;
|
||||||
error = xwimp_send_message(wimp_USER_MESSAGE, (wimp_message*)wi, wi->sender);
|
error = xwimp_send_message(wimp_USER_MESSAGE, (wimp_message*)wi, wi->sender);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user