Re: panel prelight on focus



Owen Taylor <otaylor redhat com> writes: 
> Probably the panel needs to be changed so that it marks itself with the
> appropriate ICCCM focus mode (globally active, most likely) and handles
> focusing itself, itself.

There's no need to do this. The window manager already knows it's a
panel. We just say:

 - the window manager never focuses the panel on EnterNotify 
   or ButtonPress
 - the window manager does focus the panel if it gets 
   a _NET_ACTIVE_WINDOW message (gtk_window_present())
 - the panel calls gtk_window_present() on itself when it wants focus

I already suggested this a while back I think, when people were
threatening total crackrock like unsetting GTK_CAN_FOCUS on all the
widgets in the panel. ;-)

This is trivial to implement in the WM it's just "if window type is
DOCK then don't do any focusing on Enter/Button events", end of
implementation.

> If we want to make the panel not focus when you click on launchers or
> on tasklist buttons, it basically needs to be done this way. However,
> that means that it won't be in the window manager tab chain, so we
> need some other method of focusing the panel from the keyboard.

It can still be in the tab chain, that's an orthogonal question to
whether the panel gets focus on click. Remember the window manager has
full knowledge of which windows are panel windows.

I currently don't have the panel in the Metacity tab chain but it's a
one-line fix to change.

My thought though was that some different keybinding would give you a
tab chain that included panels and the desktop but not normal
windows. I haven't implemented that yet.

Or alternatively, sort of inspired by Windows, Alt+Tab could move
among desktop/panels if a desktop or panel has focus, and between 
normal windows if a normal window has focus, and you have to use a
special keybinding (like the Windows "show desktop" binding) to 
initially focus a desktop or panel.

No idea which approach is best, Calum I don't know if you've
documented how the overall desktop keynav including window manager
should work yet?

Havoc



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