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 151990 - Prevent focus inconsistencies by only providing one focus method
Prevent focus inconsistencies by only providing one focus method
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.8.x
Other Linux
: Normal minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2004-09-06 16:12 UTC by Elijah Newren
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove all but one focus function from workspace.h (2.47 KB, patch)
2004-09-06 16:13 UTC, Elijah Newren
accepted-commit_after_freeze Details | Review

Description Elijah Newren 2004-09-06 16:12:22 UTC
meta_workspace_focus_default_window is designed to do the correct thing for all
focus modes.  meta_workspace_focus_mru_window and
meta_workspace_focus_top_window are designed for special cases only used in
certain focus modes (and are called by meta_workspace_focus_default_window). 
Thus, I think it would make sense to make the latter two functions static and
remove them from the workspace.h header file.  This would help prevent future
patches from introducing focus inconsistencies.  I will attach a patch momentarily.
Comment 1 Elijah Newren 2004-09-06 16:13:03 UTC
Created attachment 31331 [details] [review]
Remove all but one focus function from workspace.h
Comment 2 Elijah Newren 2004-09-06 16:20:44 UTC
Ooops, I should have explained why I removed the meta_workspace_focus_top_window
from screen.c instead of replacing it with meta_workspace_focus_default_window.
 I did some testing, looking through debug logs, etc., and found that in
click-to-focus mode the meta_workspace_focus_top_window call there would merely
focus the window that already had focus when the user pressed Ctrl-Alt-d to show
the desktop. (In other words, when the desktop was shown, no shuffling occurred
that would prevent the window that previously had focus from getting focus again).
  
In sloppy and mouse focus modes, the focus might switch to a different window
that was hidden (if the window that was focus was stacked below another). 
Switching to meta_workspace_focus_default_window would just make sure that in
all three focus modes, the window that had focus would again be focused when the
user tried to show the desktop.  That's merely a waste of effort, so I removed
the call.
Comment 3 Havoc Pennington 2004-09-06 17:09:33 UTC
Comment on attachment 31331 [details] [review]
Remove all but one focus function from workspace.h

Good cleanup, thanks.
Comment 4 Elijah Newren 2004-09-15 16:45:24 UTC
committed.