Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Re: [PATCH] gui-gtk transient windows
Home

[Freeciv-Dev] Re: [PATCH] gui-gtk transient windows

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Mathias Hasselmann <Mathias.Hasselmann@xxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] gui-gtk transient windows
From: Daniel Burrows <Daniel_Burrows@xxxxxxxxx>
Date: Mon, 3 Jul 2000 17:20:32 -0400

On Mon, Jul 03, 2000 at 08:35:20PM +0200, Mathias Hasselmann 
<Mathias.Hasselmann@xxxxxx> was heard to say:
> > Okay, maybe for the city window. But the message window you probably don't
> > want to have in front of the game window all the time which happens if you
> > mark it as transient. Since you can have these windows open and still use
> > the game window to play it's a bit strange for me to have these other
> > windows always in the front of the game window.
> 
> I do. I do not see what's you problem with transient windows. They
> behave like normal windows. That sawfish does not offer a minize
> button nor a rollup button - that definitly a bug. (Among other
> bug the sawfish developers call feature....)

  Ummm, the button placement in sawfish is determined by the theme.  Personally,
I use a theme with only one button (a close button) on every single window,
and like it very much.  Please drop the snide remarks, it's much easier to
have a discussion if you do..

> As written before: In IceWM, AfterStep, BlackBox, Enlightenment,
> fvwm, fvwm2 and twm transient windows are normal toplevel windows.
> You can still reach all the other windows, you can interact
> with the parent window. You can use other transient windows of this
> parent window. And you can move the transient window out of it's 
> parents (Since it is no child of this).

  The meaning of the "Transient" window type, as I understand it, it rather
like the meaning of tags in markup languages like LaTeX in that rather than
specifying how to display something, it specifies what it is.  Specifically,
"transient" -- as its name specifies -- is generally used for windows which
are interacted with for a short period of time, but which are the focus of
user input in the program for that time (I'm not familiar with the official
spec, but I think this is approximately correct.  Club me over the head if
it isn't :) )  Most WMs let you configure their handling of transients,
generally allowing more-or-less "normal" treatment as well as various special
things (using a different frame, handling their stacking differently, etc)

  Now, from that point of view, I don't think that any of the major dialog
boxes in Freeciv are appropriately transient -- the science dialog, the trade
dialog, etc, etc are often open for long periods of time in the background, to
monitor what's going on.

  Things like the "what should this diplomat do?" dialog, the "trade caravan
arrives" dialog, and the popup messages, on the other hand, are clearly
transient windows -- if we aren't already marking them as such it's a bug
and should be fixed.

> The only difference is, that you can't put them into the background
> by accident. And this feature, putting the message window, the
> city dialog and other windows behind the main frame, nerves me.

  nerves: do you mean "bugs" or "annoys"?  (that's the most logical definition
of "nerven" I can come up with for that sentence, and I assume that's what you
meant?)

  If you don't like this, I suggest you look into configuring your window
manager to keep certain windows on top.  I don't know about IceWM, but every
other modern WM I've used allows this.  (if they have separate window-classes,
it's trivial to do this and all sorts of other usefull stuff in Sawmill)

> If not all people like it it should get a checkbox in the view
> menu or the preferences box.

  that might work--although I'm not sure if you can change the type of
a window after it's been created.  Does anyone know?  (I guess you could
destroy all open dialogs and recreate them when this option is toggled; it
probably won't happen often)

  As we say on the sawmill list, long live the toggle button! :)

> > So, we should decide what the windows are and how we are going to handle
> > them. I don't se the message window and player windows as
> > transient. Transient windows for me are typicly dialogs that you open, use
> > and close.
> 
> No those are modal dialogs. Well, sawfish suggests something else.
> But beside the idea to utilize the Gtk for drawing this
> application is completely a bug in my eyes.

  Yes, modal dialogs are usually transient.
From Webster's Revised Unabridged Dictionary (1913) [web1913]:

  Transient \Tran"sient\, n.
     That which remains but for a brief time. --Glanvill.

  that's pretty much a perfect description of what "transient" means.

  Now, looking in the GDK headers, I see the following window types:
GDK_WINDOW_ROOT -- not useful for us
GDK_WINDOW_TOPLEVEL -- a normal toplevel window
GDK_WINDOW_CHILD -- a window which is a child of another window
                    (like a button inside a window)
GDK_WINDOW_DIALOG -- "used for any transient window"; I suspect this is the
                    standard "transient-window" thing.
GDK_WINDOW_TEMP  -- undocumented, scary :)
GDK_WINDOW_FOREIGN -- a window which is handled by some other program, not
                      useful for us

  Of these, GDK_WINDOW_DIALOG seems to be the only choice for either modal
dialogs or transient windows.  (which are usually the same thing, as you
pointed out above)

  And are you suggesting that you don't want to use GTK+ for the client?  Have
you tried the Xaw client?  That may be what you want..

  In any event, I have to say that your idea sounds to me like an abuse of
the transient hint not unlike the abuses of HTML that we see out there, and
if we implement it it should be an option defaulting to OFF.

  Daniel

-- 
/----------------- Daniel Burrows <Daniel_Burrows@xxxxxxxxx> -----------------\
|     If you're reading    |    "You mean, you'll drop your rock and          |
|    this, you have too    |     I'll drop my sword and we'll just try to     |
|      much free time.     |     kill one another like civilized people?"     |
|                          |      -- "The Princess Bride"                     |
\----------------- The Turtle Moves! -- http://www.lspace.org ----------------/



[Prev in Thread] Current Thread [Next in Thread]