Re: Pending 1.2 stuff



Lubos Lunak <l lunak sh cvut cz> writes: 
>  Actually, KDE uses STAYS_ON_TOP even for things like the panel (it's possible 
> to configure the panel not to be above normal windows).

Hmm, that's not really right though, because the STAYS_ON_TOP there
does not convey any information not already conveyed by the semantic
type of the panel. (If you wanted a "keep panels on top or not"
option, then that should be in the window manager, in my opinion.)

> We also use it for few dialogs, like the minicli or the 'do you
> accept the cookie' dialog (this specific one maybe shouldn't
> actually use it).

Right. One question is, if a panel is "on top", how do we convey that
a dialog such as the "run command" dialog should be above the panel.
 
>  Maybe we should simply in the spec explicitly state the layering
> order.

I think the spirit of the spec is to keep things semantic, if
possible.

> Right 
> now, KDE has windows stacked this way, from the bottom:
> - TYPE_DESKTOP
> - "normal windows"
> - STAYS_ON_TOP windows
> - fullscreen window if it has the focus
>  Transient windows are (or at least should be) placed above the windows 
> they're transient to.
> 
>  For example, we could make the layering order this way (from bottom):
> - TYPE_DESKTOP
> - STATE_STAYS_BELOW?
> - "normal" windows (i.e. not elsewhere)
> - TYPE_SPLASH, (TYPE_MENU?), TYPE_DOCK(only if we have also STAYS_BELOW)
> - STATE_STAYS_ON_TOP
> - TYPE_FULLSCREEN, if focused (otherwise as "normal")
>  And transient windows will be kept above their windows (this will take care 
> of toolbars, etc.).
> 

Here is what I have in metacity so far, and then there is a
"transients stay above their parents" rule as well:

typedef enum
{
  META_LAYER_DESKTOP    = 0,
  META_LAYER_BOTTOM     = 1,
  META_LAYER_NORMAL     = 2,
  META_LAYER_TOP        = 3,
  META_LAYER_DOCK       = 4,
  META_LAYER_FULLSCREEN = 5,
  META_LAYER_SPLASH     = 6,
  META_LAYER_LAST       = 7
} MetaStackLayer;

static void
compute_layer (MetaWindow *window)
{
  switch (window->type)
    {
    case META_WINDOW_DESKTOP:
      window->layer = META_LAYER_DESKTOP;
      break;

    case META_WINDOW_DOCK:
      /* still experimenting here */
      window->layer = META_LAYER_DOCK;
      break;

    case META_WINDOW_SPLASHSCREEN:
      window->layer = META_LAYER_SPLASH;
      break;

    default:
      if (group_member_is_fullscreen (window))
        window->layer = META_LAYER_FULLSCREEN;
      else
        window->layer = META_LAYER_NORMAL;
      break;
    }

  meta_topic (META_DEBUG_STACK, "Window %s on layer %d\n",
              window->desc, window->layer);
}



Havoc



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