summaryrefslogtreecommitdiff
path: root/src/workspace.h
diff options
context:
space:
mode:
authorElijah Newren <newren@math.utah.edu>2004-10-04 20:32:59 +0000
committerElijah Newren <newren@src.gnome.org>2004-10-04 20:32:59 +0000
commit16b9aff47caeb5a346ce722d21c52cbde0b46458 (patch)
tree3eff5c81852a2a395860cb1e4e167035e74647d9 /src/workspace.h
parent7d4c3025987461098c637c983460306a41369d56 (diff)
downloadmetacity-16b9aff47caeb5a346ce722d21c52cbde0b46458.tar.gz
Fix a variety of focus race conditions in all focus modes, or at least
2004-10-04 Elijah Newren <newren@math.utah.edu> Fix a variety of focus race conditions in all focus modes, or at least make them harder to trigger (fixes #152000) * src/core.[ch] (meta_core_user_lower_and_unfocus): add a timestamp parameter; pass it along to meta_workspace_focus_default_window * src/display.[ch] (meta_display_get_current_time_roundtrip): new function * src/display.c (event_callback): pass a timestamp to the meta_workspace_activate and meta_workspace_focus_default_window function calls * src/frames.c (meta_frames_button_press_event): pass a timestamp to meta_core_user_lower_and_unfocus * src/keybindings.c (handle_activate_workspace): pass a timestamp to meta_workspace_activate, (process_workspace_switch_grab): pass a timestamp to meta_workspace_focus_default_window and meta_workspace_activate, (handle_toggle_desktop): pass a timestamp to meta_workspace_focus_default_window, (do_handle_move_to_workspace): pass a timestamp to meta_workspace_activate_with_focus, (handle_workspace_switch): meta_workspace_activate * src/screen.c (meta_screen_new): pass a timestamp to meta_workspace_activate * src/window.c (meta_window_free): pass a timestamp to meta_workspace_focus_default_window, (idle_calc_showing): don't increment the focus sentinel here, (meta_window_minimize): pass a timestamp to meta_workspace_focus_default_window, (meta_window_client_message), pass a timestamp to meta_workspace_focus_default_window * src/workspace.h (meta_workspace_activate): add timestamp parameter, (meta_workspace_activate_with_focus): add timestamp parameter, (meta_workspace_focus_default_window): add timestamp parameter * src/workspace.c (meta_workspace_focus_mru_window): make this function take a timestamp and use it for meta_window_focus or XSetInputFocus, (meta_workspace_activate_with_focus): make this function take a timestamp and pass it along to meta_window_focus and meta_workspace_focus_default_window, (meta_workspace_activate): make this function take a timestamp and pass it to meta_workspace_activate_with_focus), (meta_workspace_focus_default_window): make this function take a timestamp, warn if its 0 but try to handle that case sanely, and pass the timestamp on to meta_window_focus or meta_workspace_focus_mru_window or XSetInputFocus
Diffstat (limited to 'src/workspace.h')
-rw-r--r--src/workspace.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/workspace.h b/src/workspace.h
index 4dc0df9d..018d1dfb 100644
--- a/src/workspace.h
+++ b/src/workspace.h
@@ -63,8 +63,10 @@ void meta_workspace_relocate_windows (MetaWorkspace *workspace,
gboolean meta_workspace_contains_window (MetaWorkspace *workspace,
MetaWindow *window);
void meta_workspace_activate_with_focus (MetaWorkspace *workspace,
- MetaWindow *focus_this);
-void meta_workspace_activate (MetaWorkspace *workspace);
+ MetaWindow *focus_this,
+ Time timestamp);
+void meta_workspace_activate (MetaWorkspace *workspace,
+ Time timestamp);
int meta_workspace_index (MetaWorkspace *workspace);
GList* meta_workspace_list_windows (MetaWorkspace *workspace);
@@ -78,7 +80,8 @@ void meta_workspace_get_work_area_all_xineramas (MetaWorkspace *workspace,
MetaRectangle *area);
void meta_workspace_focus_default_window (MetaWorkspace *workspace,
- MetaWindow *not_this_one);
+ MetaWindow *not_this_one,
+ Time timestamp);
MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace *workspace,
MetaMotionDirection direction);