I was using meta_workspace_contains_window() in a number of places where
2001-10-25 Havoc Pennington <hp@pobox.com> * src/window.c (meta_window_visible_on_workspace): I was using meta_workspace_contains_window() in a number of places where on_all_workspaces should also have been considered, thus this new function. Fixes bugs such as pinned windows not appearing in the tab order. (meta_window_client_message): use meta_window_visible_on_workspace * src/stack.c (find_tab_forward): ditto (find_tab_backward): ditto (meta_stack_get_tab_next): ditto (meta_stack_get_tab_list): ditto * src/place.c (get_windows_on_same_workspace): ditto * src/keybindings.c (handle_focus_previous): ditto (handle_focus_previous): ditto
This commit is contained in:
parent
bacc9c0afc
commit
d080f816b6
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
|||||||
|
2001-10-25 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/window.c (meta_window_visible_on_workspace):
|
||||||
|
I was using meta_workspace_contains_window() in a number of
|
||||||
|
places where on_all_workspaces should also have been considered,
|
||||||
|
thus this new function. Fixes bugs such as pinned windows
|
||||||
|
not appearing in the tab order.
|
||||||
|
(meta_window_client_message): use meta_window_visible_on_workspace
|
||||||
|
|
||||||
|
* src/stack.c (find_tab_forward): ditto
|
||||||
|
(find_tab_backward): ditto
|
||||||
|
(meta_stack_get_tab_next): ditto
|
||||||
|
(meta_stack_get_tab_list): ditto
|
||||||
|
|
||||||
|
* src/place.c (get_windows_on_same_workspace): ditto
|
||||||
|
|
||||||
|
* src/keybindings.c (handle_focus_previous): ditto
|
||||||
|
(handle_focus_previous): ditto
|
||||||
|
|
||||||
2001-10-24 Havoc Pennington <hp@pobox.com>
|
2001-10-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/frames.c (meta_frames_expose_event): use bg/fg not base/text
|
* src/frames.c (meta_frames_expose_event): use bg/fg not base/text
|
||||||
|
@ -1046,8 +1046,8 @@ handle_focus_previous (MetaDisplay *display,
|
|||||||
window = display->prev_focus_window;
|
window = display->prev_focus_window;
|
||||||
|
|
||||||
if (window &&
|
if (window &&
|
||||||
!meta_workspace_contains_window (screen->active_workspace,
|
!meta_window_visible_on_workspace (window,
|
||||||
window))
|
screen->active_workspace))
|
||||||
window = NULL;
|
window = NULL;
|
||||||
|
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
@ -1060,8 +1060,8 @@ handle_focus_previous (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (window &&
|
if (window &&
|
||||||
!meta_workspace_contains_window (screen->active_workspace,
|
!meta_window_visible_on_workspace (window,
|
||||||
window))
|
screen->active_workspace))
|
||||||
window = NULL;
|
window = NULL;
|
||||||
|
|
||||||
if (window)
|
if (window)
|
||||||
|
@ -350,8 +350,8 @@ get_windows_on_same_workspace (MetaWindow *window,
|
|||||||
|
|
||||||
if (!w->minimized &&
|
if (!w->minimized &&
|
||||||
w != window &&
|
w != window &&
|
||||||
meta_workspace_contains_window (window->screen->active_workspace,
|
meta_window_visible_on_workspace (w,
|
||||||
w))
|
window->screen->active_workspace))
|
||||||
{
|
{
|
||||||
windows = g_slist_prepend (windows, w);
|
windows = g_slist_prepend (windows, w);
|
||||||
++i;
|
++i;
|
||||||
|
12
src/stack.c
12
src/stack.c
@ -894,7 +894,7 @@ find_tab_forward (MetaStack *stack,
|
|||||||
|
|
||||||
if (window && IN_TAB_CHAIN (window) &&
|
if (window && IN_TAB_CHAIN (window) &&
|
||||||
(workspace == NULL ||
|
(workspace == NULL ||
|
||||||
meta_workspace_contains_window (workspace, window)))
|
meta_window_visible_on_workspace (window, workspace)))
|
||||||
return window;
|
return window;
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
@ -910,7 +910,7 @@ find_tab_forward (MetaStack *stack,
|
|||||||
|
|
||||||
if (window && IN_TAB_CHAIN (window) &&
|
if (window && IN_TAB_CHAIN (window) &&
|
||||||
(workspace == NULL ||
|
(workspace == NULL ||
|
||||||
meta_workspace_contains_window (workspace, window)))
|
meta_window_visible_on_workspace (window, workspace)))
|
||||||
return window;
|
return window;
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
@ -939,7 +939,7 @@ find_tab_backward (MetaStack *stack,
|
|||||||
|
|
||||||
if (window && IN_TAB_CHAIN (window) &&
|
if (window && IN_TAB_CHAIN (window) &&
|
||||||
(workspace == NULL ||
|
(workspace == NULL ||
|
||||||
meta_workspace_contains_window (workspace, window)))
|
meta_window_visible_on_workspace (window, workspace)))
|
||||||
return window;
|
return window;
|
||||||
|
|
||||||
--i;
|
--i;
|
||||||
@ -955,7 +955,7 @@ find_tab_backward (MetaStack *stack,
|
|||||||
|
|
||||||
if (window && IN_TAB_CHAIN (window) &&
|
if (window && IN_TAB_CHAIN (window) &&
|
||||||
(workspace == NULL ||
|
(workspace == NULL ||
|
||||||
meta_workspace_contains_window (workspace, window)))
|
meta_window_visible_on_workspace (window, workspace)))
|
||||||
return window;
|
return window;
|
||||||
|
|
||||||
--i;
|
--i;
|
||||||
@ -980,7 +980,7 @@ meta_stack_get_tab_next (MetaStack *stack,
|
|||||||
* you get a key shortcut or something on a window just as you
|
* you get a key shortcut or something on a window just as you
|
||||||
* are moving workspaces to one the window isn't on
|
* are moving workspaces to one the window isn't on
|
||||||
*/
|
*/
|
||||||
if (!meta_workspace_contains_window (workspace, window))
|
if (!meta_window_visible_on_workspace (window, workspace))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1037,7 +1037,7 @@ meta_stack_get_tab_list (MetaStack *stack,
|
|||||||
|
|
||||||
if (window && IN_TAB_CHAIN (window) &&
|
if (window && IN_TAB_CHAIN (window) &&
|
||||||
(workspace == NULL ||
|
(workspace == NULL ||
|
||||||
meta_workspace_contains_window (workspace, window)))
|
meta_window_visible_on_workspace (window, workspace)))
|
||||||
list = g_slist_prepend (list, window);
|
list = g_slist_prepend (list, window);
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
|
21
src/window.c
21
src/window.c
@ -798,6 +798,14 @@ set_net_wm_state (MetaWindow *window)
|
|||||||
return meta_error_trap_pop (window->display);
|
return meta_error_trap_pop (window->display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_window_visible_on_workspace (MetaWindow *window,
|
||||||
|
MetaWorkspace *workspace)
|
||||||
|
{
|
||||||
|
return window->on_all_workspaces ||
|
||||||
|
meta_workspace_contains_window (workspace, window);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_window_calc_showing (MetaWindow *window)
|
meta_window_calc_showing (MetaWindow *window)
|
||||||
{
|
{
|
||||||
@ -805,8 +813,8 @@ meta_window_calc_showing (MetaWindow *window)
|
|||||||
|
|
||||||
meta_verbose ("Calc showing for window %s\n", window->desc);
|
meta_verbose ("Calc showing for window %s\n", window->desc);
|
||||||
|
|
||||||
on_workspace = g_list_find (window->workspaces,
|
on_workspace = meta_window_visible_on_workspace (window,
|
||||||
window->screen->active_workspace) != NULL;
|
window->screen->active_workspace);
|
||||||
|
|
||||||
if (!on_workspace)
|
if (!on_workspace)
|
||||||
meta_verbose ("Window %s is not on workspace %d\n",
|
meta_verbose ("Window %s is not on workspace %d\n",
|
||||||
@ -818,10 +826,7 @@ meta_window_calc_showing (MetaWindow *window)
|
|||||||
meta_workspace_index (window->screen->active_workspace));
|
meta_workspace_index (window->screen->active_workspace));
|
||||||
|
|
||||||
if (window->on_all_workspaces)
|
if (window->on_all_workspaces)
|
||||||
{
|
meta_verbose ("Window %s is on all workspaces\n", window->desc);
|
||||||
on_workspace = TRUE;
|
|
||||||
meta_verbose ("Window %s is on all workspaces\n", window->desc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (on_workspace &&
|
if (on_workspace &&
|
||||||
window->display->showing_desktop &&
|
window->display->showing_desktop &&
|
||||||
@ -2479,8 +2484,8 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc);
|
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc);
|
||||||
|
|
||||||
/* Get window on current workspace */
|
/* Get window on current workspace */
|
||||||
if (!meta_workspace_contains_window (window->screen->active_workspace,
|
if (!meta_window_visible_on_workspace (window,
|
||||||
window))
|
window->screen->active_workspace))
|
||||||
meta_window_change_workspace (window,
|
meta_window_change_workspace (window,
|
||||||
window->screen->active_workspace);
|
window->screen->active_workspace);
|
||||||
|
|
||||||
|
@ -335,4 +335,7 @@ void meta_window_set_gravity (MetaWindow *window,
|
|||||||
void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
|
void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
|
||||||
XEvent *event);
|
XEvent *event);
|
||||||
|
|
||||||
|
gboolean meta_window_visible_on_workspace (MetaWindow *window,
|
||||||
|
MetaWorkspace *workspace);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,6 +39,7 @@ void meta_workspace_add_window (MetaWorkspace *workspace,
|
|||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
void meta_workspace_remove_window (MetaWorkspace *workspace,
|
void meta_workspace_remove_window (MetaWorkspace *workspace,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
/* don't confuse with meta_window_visible_on_workspace() */
|
||||||
gboolean meta_workspace_contains_window (MetaWorkspace *workspace,
|
gboolean meta_workspace_contains_window (MetaWorkspace *workspace,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
void meta_workspace_activate (MetaWorkspace *workspace);
|
void meta_workspace_activate (MetaWorkspace *workspace);
|
||||||
|
Loading…
Reference in New Issue
Block a user