gtk+ class hint



Hi there!

In 971025 the class hint is a NULL if the -class option is not used. I think
this is pretty annoying.

Two possible solutions come to mind:
a) use the instance name with an uppercased first letter (patch appended)
b) set to some predifined value if NULL (for example "Gtk_App" -- I think the
                                         last version used this one)

I think a) is the smoother solution. You can still use -class to set the class 
you want, but if you don't use it, WindowMaker will still get something to
play with ;-)

Regards,
  Oliver.
*** gtk+971025/gdk/gdk.c.orig   Sat Oct 25 23:08:49 1997
--- gtk+971025/gdk/gdk.c        Sat Oct 25 23:10:13 1997
***************
*** 364,369 ****
--- 364,374 ----
                                          10, 10, 10, 10, 0, 0 , 0);
    class_hint = XAllocClassHint();
    class_hint->res_name = gdk_progname;
+   if (gdk_progclass==NULL)
+     {
+       gdk_progclass=strdup(gdk_progname);
+       gdk_progclass[0]=toupper(gdk_progclass[0]);
+     }
    class_hint->res_class = gdk_progclass;
    XSetClassHint(gdk_display, gdk_leader_window, class_hint);
    XSetCommand(gdk_display, gdk_leader_window, argv_orig, argc_orig);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]