From e46fc467013890539c54433b94fa78857c7e0ccd Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 23 Dec 2004 00:20:33 +0000 Subject: [PATCH] Rename meta_window_visible_on_workspace to 2004-12-22 Elijah Newren * src/core.c (meta_core_user_lower_and_unfocus): * src/display.c (meta_display_get_current_tab): * src/stack.c (get_default_focus_window, meta_stack_list_windows): * src/window.c (set_net_wm_state, meta_window_should_be_showing, implement_showing, meta_window_activate, meta_window_notify_focus): * src/window.h: * src/workspace.c (meta_workspace_list_windows): Rename meta_window_visible_on_workspace to meta_window_located_on_workspace (whether or not the window was showing wasn't taken into account, which made "visible" confusing). Fixes #136314. --- ChangeLog | 16 ++++++++++++++++ src/core.c | 2 +- src/display.c | 2 +- src/stack.c | 4 ++-- src/window.c | 11 +++++------ src/window.h | 2 +- src/workspace.c | 2 +- 7 files changed, 27 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 614254b01..5e9f06686 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-12-22 Elijah Newren + + * src/core.c (meta_core_user_lower_and_unfocus): + * src/display.c (meta_display_get_current_tab): + * src/stack.c (get_default_focus_window, meta_stack_list_windows): + * src/window.c (set_net_wm_state, meta_window_should_be_showing, + implement_showing, meta_window_activate, + meta_window_notify_focus): + * src/window.h: + * src/workspace.c (meta_workspace_list_windows): + + Rename meta_window_visible_on_workspace to + meta_window_located_on_workspace (whether or not the window was + showing wasn't taken into account, which made "visible" + confusing). + 2004-12-22 Elijah Newren Partially resolve the conflicting requirements of windows on diff --git a/src/core.c b/src/core.c index 6471969b3..c2d0fcbcb 100644 --- a/src/core.c +++ b/src/core.c @@ -258,7 +258,7 @@ meta_core_user_lower_and_unfocus (Display *xdisplay, * (Borrowed from window.c.) */ if (window->screen->active_workspace && - meta_window_visible_on_workspace (window, + meta_window_located_on_workspace (window, window->screen->active_workspace)) { GList* link; diff --git a/src/display.c b/src/display.c index e4c57675e..e07359513 100644 --- a/src/display.c +++ b/src/display.c @@ -4119,7 +4119,7 @@ meta_display_get_tab_current (MetaDisplay *display, window->screen == screen && IN_TAB_CHAIN (window, type) && (workspace == NULL || - meta_window_visible_on_workspace (window, workspace))) + meta_window_located_on_workspace (window, workspace))) return window; else return NULL; diff --git a/src/stack.c b/src/stack.c index eacc9ae08..f55c61591 100644 --- a/src/stack.c +++ b/src/stack.c @@ -1344,7 +1344,7 @@ get_default_focus_window (MetaStack *stack, !window->minimized && (window->input || window->take_focus) && (workspace == NULL || - meta_window_visible_on_workspace (window, workspace))) + meta_window_located_on_workspace (window, workspace))) { if (topmost_dock == NULL && window->type == META_WINDOW_DOCK) @@ -1431,7 +1431,7 @@ meta_stack_list_windows (MetaStack *stack, MetaWindow *window = link->data; if (window && - (workspace == NULL || meta_window_visible_on_workspace (window, workspace))) + (workspace == NULL || meta_window_located_on_workspace (window, workspace))) { workspace_windows = g_list_prepend (workspace_windows, window); diff --git a/src/window.c b/src/window.c index 0b1dd234c..97a13ee05 100644 --- a/src/window.c +++ b/src/window.c @@ -1170,9 +1170,8 @@ set_net_wm_state (MetaWindow *window) meta_error_trap_pop (window->display, FALSE); } -/* FIXME rename this, it makes it sound like map state is relevant */ gboolean -meta_window_visible_on_workspace (MetaWindow *window, +meta_window_located_on_workspace (MetaWindow *window, MetaWorkspace *workspace) { return (window->on_all_workspaces && window->screen == workspace->screen) || @@ -1274,7 +1273,7 @@ meta_window_should_be_showing (MetaWindow *window) meta_verbose ("Should be showing for window %s\n", window->desc); /* See if we're on the workspace */ - on_workspace = meta_window_visible_on_workspace (window, + on_workspace = meta_window_located_on_workspace (window, window->screen->active_workspace); if (!on_workspace) @@ -1304,7 +1303,7 @@ implement_showing (MetaWindow *window, { gboolean on_workspace; - on_workspace = meta_window_visible_on_workspace (window, + on_workspace = meta_window_located_on_workspace (window, window->screen->active_workspace); /* Really this effects code should probably @@ -2166,7 +2165,7 @@ meta_window_activate (MetaWindow *window, maybe_leave_show_desktop_mode (window); /* Get window on current workspace */ - if (!meta_window_visible_on_workspace (window, + if (!meta_window_located_on_workspace (window, window->screen->active_workspace)) meta_window_change_workspace (window, window->screen->active_workspace); @@ -4240,7 +4239,7 @@ meta_window_notify_focus (MetaWindow *window, * workspace. */ if (window->screen->active_workspace && - meta_window_visible_on_workspace (window, + meta_window_located_on_workspace (window, window->screen->active_workspace)) { GList* link; diff --git a/src/window.h b/src/window.h index f1da0e980..035d9d1d9 100644 --- a/src/window.h +++ b/src/window.h @@ -466,7 +466,7 @@ void meta_window_handle_mouse_grab_op_event (MetaWindow *window, GList* meta_window_get_workspaces (MetaWindow *window); -gboolean meta_window_visible_on_workspace (MetaWindow *window, +gboolean meta_window_located_on_workspace (MetaWindow *window, MetaWorkspace *workspace); void meta_window_get_work_area_current_xinerama (MetaWindow *window, diff --git a/src/workspace.c b/src/workspace.c index 2eb9ec033..357a8e560 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -384,7 +384,7 @@ meta_workspace_list_windows (MetaWorkspace *workspace) { MetaWindow *window = tmp->data; - if (meta_window_visible_on_workspace (window, workspace)) + if (meta_window_located_on_workspace (window, workspace)) workspace_windows = g_list_prepend (workspace_windows, window);