Re: [Maybe OT]: Sawfish 'strange' behaviours



On Fri, 2001-12-07 at 21:22, Havoc Pennington wrote:

rob <mailingLists pangolin org uk> writes:
You need to set the wm type and class

Not the right thing to do. Here is my opinion on the matter:
 
  http://developer.gnome.org/doc/API/2.0/gtk/gtkwindow.html#GTK-WINDOW-SET-WMCLASS

Class probably wants to be the same for all the windows.
Where as type wants to be unique (for each type of window).

Different kinds of windows should be distinguished with the "role"
hint. But this shouldn't be done gratuitously just to work around
Sawfish's window size/placement policies.

Havoc

Whats wrong with setting the class and type?

I couldn't really see an explanation at the link you pointed to nor in
the ICCCM 

It's what every other app dose (and it's what you said to do in the GGAD
book). 
Reading the ICCCM it seems to do what you'd expect: the class bit
specifies some set of windows that should be considered a group and type
is used to differentiate between windows of the same class.(btw i
couldn't find where it said that class and type should be the same all I
could find was section 4.2.1.5 on the WM_CLASS)

Setting the role seems to enable you to tell apart windows of the same
type. But you'd still need to set the class bit unless your happy with
what ever default one you get.

Am I missing something? 

Here is what I'm using the window_set_wmclass thingy for if this makes
things clearer. 

I have a small suite of guitar related apps each app sets the class bit
to GnomeGuitar, it's type to its name and the type of any windows it
creates to the same i.e the save dialog of the scale viewer has a class
of GnomeGuitar and a type of gscale_save_dialog.

The result of all this is that new windows are created the same size as
the last window of the same type, they stack properly on the panel, and
have the correct icon. 
If I don't set the WM_CLASS all windows of the app are created the same
size(which looks real ugly if the main window is maximised and you pop
up a one line dialog which also maximises itself), and they don't stack
properly on the panel. 

Looking at the gtk2 docs it seems as if by default it sets the class to
the name of the app and the type to the name of the window (which is
probably what is wanted most of the time but wouldn't work for me as I
have windows from different apps in the same class). But then it says
that class and type are always set to the same thing so I don't know. 

Ok I've probably bored and confused everybody by now so I'll stop

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 

rob




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