x11 icon name
eocene <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <[email protected]> |
On fvwm, there's a pager showing the different windows on the different desktops, and usually the (beginning of the) title of the window is written on the little depiction of the window. But with Dillo, the depiction frequently had no title written on it. And I'd ignored this for a long time. Yesterday, I noticed that it had "O" when I was reading something with a window title of "Dillo: Chapter 7. I/O" and I'm like, "Slashes. It doesn't like slashes..." It seems that fvwm is displaying an "icon name". In Fl_Window::label(), if you don't set an icon name, it takes the label and runs it through fl_filename_name(name) for...some reason, thereby trimming everything up to the final slash. I just tried the attached patch, and the icon name was shown properly. Or maybe it should just be set to "Dillo" and left that way. I don't know whether there are any strong conventions here. Does your window mgr like to use the "icon name" at all? _______________________________________________ Dillo-dev mailing list [email protected] http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
icon_label.diff
(text/x-diff, 1.2 KB)
diff -r 25ebc1c82a3c src/uicmd.cc
--- a/src/uicmd.cc Sun Jul 20 17:08:18 2014 +0000
+++ b/src/uicmd.cc Tue Jul 22 18:57:08 2014 +0000
@@ -433,7 +433,9 @@
// Update window title
if ((bw = a_UIcmd_get_bw_by_widget(cbtn->ui()))) {
const char *title = (cbtn->ui())->label();
- cbtn->window()->copy_label(title ? title : "");
+ Fl_Window *win = cbtn->window();
+ win->copy_label(title ? title : "");
+ win->iconlabel(win->label());
}
// Update focus priority
increase_focus_counter();
@@ -605,8 +607,11 @@
new_bw->render_layout = (void*)layout;
// Clear the window title
- if (focus)
- new_ui->window()->copy_label(new_ui->label());
+ if (focus) {
+ Fl_Window *win = new_ui->window();
+ win->copy_label(new_ui->label());
+ win->iconlabel(win->label());
+ }
// WORKAROUND: see findbar_toggle()
new_ui->findbar_toggle(0);
@@ -1413,7 +1418,9 @@
if (a_UIcmd_get_bw_by_widget(BW2UI(bw)->tabs()->wizard()->value()) == bw) {
// This is the focused bw, set window title
- BW2UI(bw)->window()->copy_label(title);
+ Fl_Window *win = BW2UI(bw)->window();
+ win->copy_label(title);
+ win->iconlabel(win->label());
}
}