Prevent focus inconsistencies by only providing one focus method (fixes

2004-09-15  Elijah Newren  <newren@math.utah.edu>

	Prevent focus inconsistencies by only providing one focus method
	(fixes #151990)

	* src/screen.c (meta_screen_show_desktop): remove call to
	meta_workspace_focus_top_window (it was merely focusing a window
	that was going to be hidden anyway, and likely the one that
	already had focus)

	* src/workspace.[hc]: remove meta_workspace_focus_mru_window and
	meta_workspace_focus_top_window from workspace.h, make them static
	functions in workspace.c
This commit is contained in:
Elijah Newren 2004-09-15 16:42:52 +00:00 committed by Elijah Newren
parent 5ac6fcad73
commit 101a097f02
4 changed files with 14 additions and 10 deletions

View File

@ -1,8 +1,15 @@
2004-09-15 Elijah Newren <newren@math.utah.edu>
Prevent focus inconsistencies by only providing one focus method
(fixes #151990)
*
2004-09-15 Elijah Newren <newren@math.utah.edu> 2004-09-15 Elijah Newren <newren@math.utah.edu>
Remove race condition for focus window choice on window close Remove race condition for focus window choice on window close
followed by rapid mouse movement in sloppy and mouse focus modes followed by rapid mouse movement in sloppy and mouse focus modes
(fixes #152000) (partially fixes #152000)
* src/window.c (meta_window_free): Don't increment the focus * src/window.c (meta_window_free): Don't increment the focus
sentinel for windows being freed, (idle_calc_showing): don't sentinel for windows being freed, (idle_calc_showing): don't

View File

@ -2239,8 +2239,6 @@ meta_screen_show_desktop (MetaScreen *screen)
queue_windows_showing (screen); queue_windows_showing (screen);
update_showing_desktop_hint (screen); update_showing_desktop_hint (screen);
meta_workspace_focus_top_window (screen->active_workspace, NULL);
} }
void void

View File

@ -27,9 +27,12 @@
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <string.h> #include <string.h>
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace); void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
static void set_active_space_hint (MetaScreen *screen);
static void set_active_space_hint (MetaScreen *screen); static void meta_workspace_focus_mru_window (MetaWorkspace *workspace,
MetaWindow *not_this_one);
static void meta_workspace_focus_top_window (MetaWorkspace *workspace,
MetaWindow *not_this_one);
static void static void
maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data) maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)

View File

@ -77,12 +77,8 @@ void meta_workspace_get_work_area_for_xinerama (MetaWorkspace *workspace,
void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace, void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace,
MetaRectangle *area); MetaRectangle *area);
void meta_workspace_focus_mru_window (MetaWorkspace *workspace,
MetaWindow *not_this_one);
void meta_workspace_focus_default_window (MetaWorkspace *workspace, void meta_workspace_focus_default_window (MetaWorkspace *workspace,
MetaWindow *not_this_one); MetaWindow *not_this_one);
void meta_workspace_focus_top_window (MetaWorkspace *workspace,
MetaWindow *not_this_one);
MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace *workspace, MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace *workspace,
MetaMotionDirection direction); MetaMotionDirection direction);