mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Take into account the appropriate list of windows when placing a new one.
2005-01-28 Elijah Newren <newren@gmail.com> Take into account the appropriate list of windows when placing a new one. Fixes #165381. * src/place.c: (meta_window_place): use meta_window_showing_on_its_workspace(w) instead of !w->minimzed, also take into account sticky windows * src/window.[ch]: rename window_showing_on_its_workspace to meta_window_showing_on_its_workspace and export it
This commit is contained in:
parent
1e580d1e52
commit
5389f135ce
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2005-01-28 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Take into account the appropriate list of windows when placing a
|
||||
new one. Fixes #165381.
|
||||
|
||||
* src/place.c: (meta_window_place): use
|
||||
meta_window_showing_on_its_workspace(w) instead of !w->minimzed,
|
||||
also take into account sticky windows
|
||||
|
||||
* src/window.[ch]: rename window_showing_on_its_workspace to
|
||||
meta_window_showing_on_its_workspace and export it
|
||||
|
||||
2005-01-27 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Plug a pair of leaks. Fixes #165378
|
||||
|
@ -748,9 +748,10 @@ meta_window_place (MetaWindow *window,
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
|
||||
if (!w->minimized &&
|
||||
if (meta_window_showing_on_its_workspace (w) &&
|
||||
w != window &&
|
||||
window->workspace == w->workspace)
|
||||
(window->workspace == w->workspace ||
|
||||
window->on_all_workspaces || w->on_all_workspaces))
|
||||
windows = g_list_prepend (windows, w);
|
||||
|
||||
tmp = tmp->next;
|
||||
|
10
src/window.c
10
src/window.c
@ -94,8 +94,6 @@ static void ensure_mru_position_after (MetaWindow *window,
|
||||
|
||||
void meta_window_move_resize_now (MetaWindow *window);
|
||||
|
||||
static gboolean window_showing_on_its_workspace (MetaWindow *window);
|
||||
|
||||
/* FIXME we need an abstraction that covers all these queues. */
|
||||
|
||||
void meta_window_unqueue_calc_showing (MetaWindow *window);
|
||||
@ -1131,7 +1129,7 @@ set_net_wm_state (MetaWindow *window)
|
||||
data[i] = window->display->atom_net_wm_state_fullscreen;
|
||||
++i;
|
||||
}
|
||||
if (!window_showing_on_its_workspace (window) || window->shaded)
|
||||
if (!meta_window_showing_on_its_workspace (window) || window->shaded)
|
||||
{
|
||||
data[i] = window->display->atom_net_wm_state_hidden;
|
||||
++i;
|
||||
@ -1195,8 +1193,8 @@ ancestor_is_minimized (MetaWindow *window)
|
||||
return is_minimized;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
window_showing_on_its_workspace (MetaWindow *window)
|
||||
gboolean
|
||||
meta_window_showing_on_its_workspace (MetaWindow *window)
|
||||
{
|
||||
gboolean showing;
|
||||
gboolean is_desktop_or_dock;
|
||||
@ -1280,7 +1278,7 @@ meta_window_should_be_showing (MetaWindow *window)
|
||||
if (window->on_all_workspaces)
|
||||
meta_verbose ("Window %s is on all workspaces\n", window->desc);
|
||||
|
||||
return on_workspace && window_showing_on_its_workspace (window);
|
||||
return on_workspace && meta_window_showing_on_its_workspace (window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -388,6 +388,9 @@ void meta_window_resize_with_gravity (MetaWindow *window,
|
||||
void meta_window_fill_horizontal (MetaWindow *window);
|
||||
void meta_window_fill_vertical (MetaWindow *window);
|
||||
|
||||
/* Return whether the window would be showing if we were on its workspace */
|
||||
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
|
||||
|
||||
/* Return whether the window should be currently mapped */
|
||||
gboolean meta_window_should_be_showing (MetaWindow *window);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user