After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 525774 - _NET_WM_WINDOW_TYPE_UTILITY type windows don't take input focus when mapped
_NET_WM_WINDOW_TYPE_UTILITY type windows don't take input focus when mapped
Status: RESOLVED INVALID
Product: metacity
Classification: Other
Component: general
2.18.x
Other All
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2008-04-02 15:09 UTC by Dmitry Timoshkov
Modified: 2010-01-21 07:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Allow utility windows to take focus on map (406 bytes, patch)
2008-05-01 07:52 UTC, Dmitry Timoshkov
reviewed Details | Review

Description Dmitry Timoshkov 2008-04-02 15:09:08 UTC
Please describe the problem:
I'm running Ubuntu 7.04 with Metacity 2.18.2.

Metacity sources (src/window.c, window_state_on_map()) indicate that utility
and toolbar windows don't take focus on map.

http://live.gnome.org/Metacity/WindowTypes says that Utility type is
"Appropriate for toolboxes, formatting palettes, and Find/Change windows".

Since it mentions "Find/Change windows", does that mean that in order to start
typing a user has to click on a window first?

(I'm a Wine developer, and Wine makes windows with WS_EX_TOOLWINDOW style set
have an utility type. That leads to quite a bit of trouble and user confusion
due to the behaviour described above.)

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?
Yes.

Other information:
Comment 1 Elijah Newren 2008-04-05 17:05:24 UTC
Metacity's support for utility windows is somewhat lacking...at least partially due to lack of number of applications using them.  

The wiki page you point to was some suggestions by a member of the usability team (mpt); I can't remember all the details, but I do remember there being some good ideas that we simply haven't had time to implement.  However, the suggestion to use utility windows for find/change windows seems a bit odd to me...maybe I just need to re-read the page but traditionally people have just made those dialogs.  For best compatibility with what is currently implemented, I'd suggest making find/change windows dialogs for now.
Comment 2 Dmitry Timoshkov 2008-04-07 03:31:02 UTC
The purpose of this bug report to clarify whether there are some reasons
behind the described behaviour, but if there is no really one, then please
consider changing the Metacity to make utility windows have keyboard input
focus after mapping.

Just for your information, KDE's WM doesn't have this bug.
Comment 3 Dmitry Timoshkov 2008-05-01 07:52:49 UTC
Created attachment 110211 [details] [review]
Allow utility windows to take focus on map

Attached patch should fix this problem. Also, the same thing should be done
for META_WINDOW_MENU, otherwise I don't see how keyboard navigation in menus
supposed to work.
Comment 4 Dmitry Timoshkov 2008-09-15 07:41:26 UTC
Can somebody from the Metacity team comment on this bug please?
Comment 5 Havoc Pennington 2008-09-15 19:25:46 UTC
The original idea of utility windows was for the little tool palette windows that you see on mac, with the small titlebar and (not sure about this) maybe they vanish when the application is not focused. But definitely it's for always-open windows like Photoshop toolbox, not for open-quickly-then-close windows like a find dialog.

I think it is a fair statement that these window types are not really tested or adequately thought through at this point, so probably should not be used except by people willing to sort of define the style guide as they go and patch the WM and specs accordingly.

I have no idea, personally, how keynav and focus would be intended to work on these, but offhand I'd guess what you want with say the Photoshop toolbox is that it never gets focused, in particular not when you click on it, though there might be some obscure way to focus it (sort of like how F10 focuses the menubar)

If you can point to some docs on WS_EX_TOOLWINDOW people might venture an opinion on whether that style would be the same as the mac-type toolbox windows.

But basically the only apps that really could/would use this window type (gimp, inkscape type of stuff) do not use it. So it's sort of vestigial.

Comment 6 Thomas Thurman 2010-01-20 19:12:42 UTC
Review of attachment 110211 [details] [review]:

Marking reviewed per Havoc's comments.
Comment 7 Thomas Thurman 2010-01-20 19:15:38 UTC
Marking INVALID per Havoc's comments.  Reporter, feel free to reopen if you disagree and have reasons.
Comment 8 Dmitry Timoshkov 2010-01-21 07:28:25 UTC
I don't see how Havoc's comments make this bug invalid. Current utility windows
behaviour neither match the documented nor logically expected one. You either
need to fix documentation/better describe what's expected from utility windows
or change Metacity to comply with docs. See the original report for reasons.

I'm not insisting though, so if you prefer to have utility windows support
kind of broken/inconsistent, or just not willing to do anything - feel free
to ignore this report.