Re: panel focus
- From: Havoc Pennington <hp redhat com>
- To: "Padraig O'Briain" <Padraig Obriain sun com>
- Cc: calum benson sun com, snickell stanford edu, bill haneman sun com, desktop-devel-list gnome org
- Subject: Re: panel focus
- Date: 08 Mar 2002 11:26:44 -0500
"Padraig O'Briain" <Padraig Obriain sun com> writes:
> It seems to me that Seth is asking that the GTK_CAN_FOCUS flag not be set on
> objects on the panel, except in very limited circumstances.
>
> The problem at present is that when a button on the panel is pressed, it
> receives focus as the button press signal handler calls gtk_widget_grab_focus()
> and the GTK_CAN_FOCUS flasg is set.
>
> One possible solution could be to unset the GTK_CAN_FOCUS flag fopr all objects
> on the panel when the window loses focus and set the flag when the window
> receives focus. I will investigate this further.
>
The issue is whether the panel itself (as a toplevel) gets focused by
the WM though, not whether the sub-widget within the panel gets focus,
right? It's probably even correct that the last thing you clicked
grabs focus, even if the panel itself is not focused.
What Metacity does is special-case focus handling for windows of type
DOCK, such as the panel. However we can't do it all in the WM, because
the WM can't distinguish between clicks on various applets.
An outline of a suggestion is that the WM never focuses the panel;
however applets such as mini_commmander call gdk_window_focus() (or
gtk_window_present()) on the toplevel panel window they are inside,
when they receive a button click event. The WM will then be asked to
focus the panel, the panel will get focus, and the user can type.
Anyhow it should be easy to modify Sawfish not to focus dock windows
unless explicitly asked, and as far as I can see that solves the
problem, we just add code to applets that really do want focus to
explicitly focus their toplevels.
(Possibly you need to extend the applet API to let the embedded applet
ask its parent panel to call gtk_window_present() on its behalf.)
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]