! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Undocked toolbars
Status:
CLOSED: FIXED

Comments

Description Bernhard Walle 2004-06-05 20:40:20 CEST
There's a problem with undocked menu bars and icon bars. If a dialog is
opened, the main window doesn't get the focus but the toolbar.

To reproduce, do following:

1. Open gftp (2.0.17)
2. Drag the || (left) at the toolbar to make it floating.
3. Focus the main window.
4. Help -> About
5. Close
6. Type a few characters, you'll see that the input focus is at the
"Host" field.

Or:

1. Open Konqueror (KDE 3.2.2)
2. Double click the || (left) at the toolbar to make it floating.
3. Focus the main window.
4. Help -> About KDE
5. Close
6. You'll see optically that the focus is at the toolbar.


One solution could be to exclude _NET_WM_WINDOW_TYPE_TOOLBAR from getting
automatically the focus if another window is closed. Consider also
_NET_WM_WINDOW_TYPE_MENU and even _NET_WM_WINDOW_TYPE_UTILITY.
Comment 1 Olivier Fourdan editbugs 2004-06-05 21:12:06 CEST
Thanks, I'll look into it.
Comment 2 Olivier Fourdan editbugs 2004-06-19 13:14:07 CEST
The gftp problem is from gftp, it's not a bug with xfwm4. It shows in metacity
too.
Comment 3 Bernhard Walle 2004-06-19 13:39:49 CEST
Not here, maybe you use another version or configuration.

What's about Qt dockbars?

AFAIK there are no general Gtk+ dockbars, are they?
But Anjuta shows the same problem, maybe you can test it in Metacity, too, if
you have Anjuta installed.
Comment 4 Olivier Fourdan editbugs 2004-06-19 14:11:28 CEST
- I've tested with metacity 2.8.0 from GNOME 2.6 -

There is no way to identify those toolbars are they are not using the NET_WM
type field (ie the proposed solution will have no effect at all)

One solution is to send focus back to the previous focused window (this was the
original solution that was implemented in xfce 4.0.0 but reverted later because
of the OpenOffice bug)
Comment 5 Olivier Fourdan editbugs 2004-06-19 14:15:36 CEST
Also not that the bug might in gtk itself too, as it seems the app just set the
gtk_widget grab_default on the text field widget (the one that gets the focus).

gtk_widget_grab_default causes widget to become the default widget. widget must
have the GTK_CAN_DEFAULT flag set; typically you have to set this flag yourself
by calling GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT). The default widget
is activated when the user presses Enter in a window. Default widgets must be
activatable, that is, gtk_widget_activate() should affect them.
Comment 6 Bernhard Walle 2004-06-19 14:18:18 CEST
Qt sets _NET_WM_WINDOW_TYPE_TOOLBAR, so there would be a possiblity to identify
at least the Qt toolbars (and _NET_WM_WINDOW_TYPE_TOOLBAR is freedesktop.org
standard).
Comment 7 Olivier Fourdan editbugs 2004-06-19 14:25:49 CEST
If you are using xfce from CVS head, you may want to try this version:

http://www.xfce.org/archive/test/xfwm4-4.1.4-cvs.tar.gz

I see no problem with anjuta btw.
Comment 8 Olivier Fourdan editbugs 2004-06-19 14:42:25 CEST
And if you use xfce stable branch (4.0), you may want to try this one:

http://www.xfce.org/archive/test/xfwm4-4.0.6-cvs.tar.gz

It also has the same change backported.
Comment 9 Bernhard Walle 2004-06-19 14:49:52 CEST
Great, this version fixes the problems in Anjuta, and Qt.
Comment 10 Jasper Huijsmans editbugs 2004-09-20 20:42:52 CEST
Fix + confirmation

Bug #218

Reported by:
Bernhard Walle
Reported on: 2004-06-05
Last modified on: 2009-07-14

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information